The difference between / select & / query handlers in solr

I want to know what the exact difference between the / select and / query handlers in solr is.

For the / select handler, the request is formed as.

/solr/collection/select?q=lalit&wt=json 

which gives less results. enter image description here

But for / query it? / Solr / Collection / uery q = Lalit & weight = JSON

which gives much more results.

enter image description here

+6
source share
1 answer

The answer to this depends on the contents of your solrconfig.xml , as it is a configuration file in which different requestHandlers are defined. If you are looking for this file for <requestHandler name="/select" class="solr.SearchHandler"> and <requestHandler name="/query" class="solr.SearchHandler"> , you can find the difference.

In Solr, there is no other processing for the two inside, and their behavior is always configured in solrconfig.xml . The default configuration in the solrconfig.xml file from the example/solr solr directory does this by setting the value for df (the default search field) to text (this means that searching for different fields is performed depending on which endpoint you point your search to on the).

You can customize your own definitions such as /queryfoo , /bar , etc. with various presets, if you have a need for the future, although most settings are usually provided by the client.

+6
source

Source: https://habr.com/ru/post/974024/


All Articles