You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mat Brown <ma...@patch.com> on 2009/10/16 19:33:01 UTC

Which query parser handles nested queries?

Hi all,

I'm trying to figure out which query parser handles nested queries
(the kind documented here:
http://www.lucidimagination.com/blog/2009/03/31/nested-queries-in-solr/).
When working with Solr 1.3 stable, I'm able to use this syntax
effectively using the default requestHandler, but when I am
hand-rolling my own requestHandler, it doesn't recognize the _query_
field name. If I use the NestedQParserPlugin, I can get closer, but
what I really need is to be able to combine regular Solr query syntax
with a nested dismax query, and it's not clear how/whether that can be
done with the NestedQParserPlugin. Seems quite possible with the
default query parser that Solr uses, though.

Any help would be much appreciated!

Mat

Re: Which query parser handles nested queries?

Posted by Chris Hostetter <ho...@fucit.org>.
: http://www.lucidimagination.com/blog/2009/03/31/nested-queries-in-solr/).
: When working with Solr 1.3 stable, I'm able to use this syntax
: effectively using the default requestHandler, but when I am
: hand-rolling my own requestHandler, it doesn't recognize the _query_

the magic field _query_ is special syntax of the SolrQueryParser (aka the 
"lucene" QParserPlugin)  (FYI: if you know jaav, which i assume you do it 
you're writting your own requestHandler) you can find this by grepping the 
code base for '"_query_"'

So if you use SolrQueryParser in your own request handler you should be 
fine ... if you're writting a custom request handler you'll have to add 
that same special handling.


-Hoss