lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: query expansion à la dismax
Date Fri, 01 Apr 2011 02:43:22 GMT

: So I wrote my own code that filters the top level queries and expands 
: them, using a similar instruction as dismax within a particular query 
: component.
: 
: Question 1: doesn't such a code already exist?
:  (I haven't found it)

the DisjunctionMaxQueryParser class has support for configuring field 
aliase -- in the DisMaxQParser it only uses it with setting up aliaes for a 
(fake) default field, but if you use it directly in code you can set up 
specific aliases for specific field names (there's plans to do this for 
the edismax handler but some other weird behavior bugs are holding it up)

: Question 2: should I rather make a QParserPlugin?
:   (the javadoc is not very helpful)

implementing QParserPlugin is how you register a plugin that solr knows 
to use to parse query strings when the user asks for a parser by name 
(either using the defType param, or with the local param syntax).  within 
your QParserPlugin you can implement the actaul parsing anyway you like.

The LuceneQParserPlugin serves as a really simple example of how to 
implement a QParserPlugin if you've already got a QueryParser subclass 
that you want to use -- it's really just about managing the request 
parameters.


-Hoss

Mime
View raw message