0

My first Solr query is:

http://localhost:8983/solr/test/select?q=id:idval

Using the result(only 1 result is returned) I get from this query, I take the "latlon" field value(let's call it latlonval from the result and pass it in to the following query:

http://localhost:8983/solr/test/select?q=*:*&fq={!geofilt pt=latlonval sfield=latlon d=50}

Using two queries is taking too much time to process. Is there anyway to combine these two queries into a single query? Probably using joins. If so, please show me how.

  • Which part of those queries are taking too much time? My guess is that your second query is _really_ expensive, and the first one should complete (it's a single index lookup after all) in a ms or less. My guess is that your second query should probably be optimized (using a different field type, different settings (docvalues), etc.) - turn off caching if the coordinates used are fairly unique. – MatsLindh Jan 30 '18 at 13:16
  • @MatsLindh I want to combine those queries into a single query. A nested query of some sort. Can you please help me with that? – Akash Prasanna Basabhat Jan 31 '18 at 05:37
  • My point is that combining them might not be the easiest solution, and will probably not make things go much faster - if the last query is what consumes 99.99% of your time, then removing the one roundtrip won't do much in any direction. – MatsLindh Jan 31 '18 at 09:06
  • @MatsLindh I felt making a single query is better than making two different queries. – Akash Prasanna Basabhat Jan 31 '18 at 09:16

0 Answers0