Is there a right/wrong way to build queries in solr? Let’s say I have two indexed fields, x and y. And a query like +x:123 +y:abc. Does the order of the expressions matter (as far as performance is concerned)? For example, if one of the expressions produces a smaller document set than the other, could this impact query performance?
Is there a right/wrong way to build queries in solr? Let’s say I have
Share
I would think if “+x:123 +y:abc” are being used in a text search parameter there would be no difference in the order. The big performance gains are when you know when to use fq (filter query) vs. q and have caching / commit tuned.
fq is best for non-“text search” fields with a limited list of values (like make, model, type, category, color)
q would be for “text search” so looking for “web developer rockstar” vs “rockstar developer web” will return the same results.