lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Smith <>
Subject RE: Lucene->SOLR transition
Date Mon, 19 Sep 2011 18:59:37 GMT
OK.  Thanks for all of the suggestions.



-----Original Message-----
From: Erik Hatcher [] 
Sent: Monday, September 19, 2011 3:27 AM
Subject: Re: Lucene->SOLR transition

On Sep 18, 2011, at 19:43 , Michael Sokolov wrote:

> On 9/15/2011 8:30 PM, Scott Smith wrote:
>> 2.       Assuming that the answer to 1 is "correct", then is there an easy way to
take a lucene query (with nested Boolean queries, filter queries, etc.) and generate a SOLR
query string with q and fq components?
> I believe that Query.toString() will probably get you back something that can be parsed
in turn by the traditional lucene QueryParser, thus completing the circle and returning your
original Query.  But why would you want to do that?

No, you can't rely on Query.toString() roundtripping (think stemming, for example - but many
other examples that won't work that way too).

What you can do, since you know Lucene's API well, is write a QParser(Plugin) that takes request
parameters as strings and generates the Query from that like you are now with your Lucene


View raw message