I want to know what is exact difference between /select & /query handlers in solr.
For /select handler, query is formed like.
/solr/collection/select?q=lalit&wt=json
which gives less results.
But for /query, its /solr/collection/uery?q=lalit&wt=json
which gives much more results.
The answer to this depends on the contents of your solrconfig.xml
, as that is the configuration file where the different requestHandlers are defined. If you search that file for <requestHandler name="/select" class="solr.SearchHandler">
and <requestHandler name="/query" class="solr.SearchHandler">
, you should be able to find what the difference is.
There is no different handling of those two internally in Solr, and their behaviour are always configured in solrconfig.xml
. The default configuration in solrconfig.xml from the example/solr
directory does this by setting a value for df
(the default search field) to text
(meaning that different fields are searched depending on which end point you point your search to).
You can configure your own definitions, such as /queryfoo
, /bar
etc. with different presets if you have a need in the future, although most settings are usually supplied by the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With