you can try extending LuceneQParser. In its createParser method
(lucene 2.9.3 and solr 1.4) you can analyze the input query in the
param q and modify it accordingly.

On 7/9/11, Jamie Johnson <jej2...@gmail.com> wrote:
> My organization is considering a few different approaches for indexing
> vs query rewrite and I'm trying to figure out what would be required
> in order to implement some form of query rewrite.  Lets say my index
> has 2 fields first name and last name.  When the user does a query
> name:bob I'd like to transform this into first_name:bob OR
> last_name:bob.  I know this example is trivial but our real index is
> much more complex.  Are there any extension points in solr for doing
> such a thing?  If not are there any utilities which I could use for
> doing this?  We are currently using the edismax query parser so I
> suppose I could extend that to handle this but I'm starting from a
> completely blank slate so any guidance would be appreciated.
>


-- 
Regards,

Dmitry Kan

Reply via email to