The recent discussion of filter queries has got me thinking about other ways to 
improve performance of our app.  We have an index with a lot of fields and we 
support both single-search-box style queries using DisMax and fielded search 
using the standard query handler.  We also support using both strategies in the 
same search.

For exmaple, a user might enter "Alabama Biotechnology" in the main search box, 
triggering a dismax request which returns lots of different types of results.  
They may then want to refine their search by selecting a specific industry from 
a drop-down box.  We handle this by adding a filterquery (fq=) to the original 
query.  We have dozens of additional fields like this - some with a finite set 
of discrete values, some with arbitrary text values.  The combinations are 
infinite, and I'm worried we will overwhelm the filterCache by supporting all 
of these cases as filter queries.

I'm investigating nested queries as an alternative way to support this type of 
hybrid-search.  It appears that this only works when the top-level request 
query is a standard lucene-style query and the nested query is a dismax, and 
not the other way arround - correct me if I am wrong here.  It also appears 
that what is specified in the {!xxx} as the nested query type must be an actual 
query type and not the name of a request handler defined in solrconfig.xml.  
Thus it would seem that the nested query string must supply all of the default 
parameters for a dismax request.  Is this correct?  Is there another approach 
that I am missing?  I suppose I could create a new query parser class that 
would supply the defaults, but that seems like overkill.

Any comments are welcome, I just want to know that I am not completely off 
track and there isn't some really simple way to achieve this that I have 
overlooked.  Thanks all!

-Ken

Reply via email to