DisMax for analyzing user queries and q or fq for filtering results

I use PHP to capture user searches and run them through SOLR on a specific "keyword" field that essentially contains a concatenation of all the data in the document.

I also use faces in this query to further refine the result set.

My questions:

  • Should I use SOLR DisMax to parse ALL user request?
  • Is it considered bad practice to put faceted search queries directly in a standard query with a keyword search OR should I use filterqueries to filter the original standard query and its results?
+6
source share
2 answers

I would use eDisMax , it is mostly more powerful and more tolerant (this means that it usually does not return errors for garbled requests).

I highly recommend using filter queries to filter your results ( fq parameter), for example, clicking on a facet entry, mainly for these reasons:

  • filter requests do not affect solr rating
  • filter requests are faster because they are cached regardless of the main request through the filter cache
+3
source

The choice of query analyzer depends on your requirement. Should_I_use_the_standard_or_dismax_Query_Parser

Dismax / Edismax allows you to query and expand several fields, but has some limitations with the processing of operators and their support.
If you request a single field, a standard query analyzer can execute this request.

And as @javanna mentioned, you should always try to use filter queries in comparison with keyword searches, as it allows you to filter with cache support .

+2
source

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


All Articles