Solr docs state that filter queries, unlike the main query, do not influence the document score. What does this mean exactly, preferably with an example.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A FilterQuery ONLY stores document IDS. This makes it very fast to apply the filter to include/exclude documents. Good examples of this are when filtering products from search based on Country, Product Type, Availability, etc.
A normal query can perform the exact same function, but it has a very complex scoring system to determine “relevance”. I believe the documentation is indicating that scoring is only done on the Main Query, not on the Filter Query. This should also increase query speed.
So, I can query for:
Or I can query for:
The results would be the same, but the scores would be different. Also, if you get many different queries throughout the day that are for
productType:Toilet, the FilterQuery would be cached making the overall query time faster.