Handling of local params in QParserPlugin.createParser

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Handling of local params in QParserPlugin.createParser

kkrugler
Hi all,

As part of some interesting work creating a custom query parser, I was writing unit tests that exercised ExtendedDismaxQParser.

So I first created the ExtendedDismaxQParserPlugin, and then used that to create the QParser via:

        QParser parser = plugin.createParser(query, localParams, params, req);

If query is something like {!complexphrase}fieldname:”A * query”, I was expecting the complex phrase query parser to get used, but that’s not happening - the local param is being treated as regular text.

Which makes me think my conceptual model of local params processing is wrong, and there’s higher level code that does a pre-processing step first.

But I was hoping that I’d get out a DisjunctionMaxQueries where one of the queries was a ComplexPhraseQuery, which would mean the processing has to happen inside of the ExtendedDismaxQParser code.

Any pointers for where to poke around?

Thanks,

— Ken

--------------------------
Ken Krugler
+1 530-210-6378
http://www.scaleunlimited.com
custom big data solutions & training
Hadoop, Cascading, Cassandra & Solr