Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DisMax to parse user queries and q or fq to filter results

Tags:

php

solr

I am using PHP to grab user search queries and running them through SOLR on a specific field "keyword" which contains essentially a concatenation of all of the data in the document.

I am also using facets on this query to further drill down on the result set.

My questions:

  1. Should I be using SOLR DisMax to parse ALL user query?
  2. Is it considered bad practice to put the faceted drill-down searches directly into a standard query with the keyword search OR should I be using filterqueries to filter the original standard query and it's resultset?
like image 718
mmundiff Avatar asked Feb 10 '12 19:02

mmundiff


1 Answers

I would use eDisMax, it's basically more powerful and more tolerant (it means it usually doesn't return errors for malformed queries).

I'd strongly recommend to use filter queries to filter your results (fq parameter) clicking for example on a facet entry, mainly for these reasons:

  • filter queries don't influence the solr score
  • filter queries are faster, since cached independently from the main query through the filter cache
like image 200
javanna Avatar answered Oct 04 '22 14:10

javanna