On Thu, Sep 10, 2009 at 10:43 PM, Mike Anderson <[email protected]> wrote:
> I have a string that represents a boolean query (because I passed it in as > a URL parameter), is it possible to instantiate a BooleanQuery object that > represents this query? > > I think what I am looking for is something like a BooleanQuery constructor > that takes in a string, but this doesn't exist. The other option would be to > create a new empty Boolean Query and then deconstruct the string and > populate my new BQ, but i'm not sure how to deconstruct the string in this > way. > > A Query object is independent of the string representation. Look at Lucene's org.apache.lucene.queryParser.QueryParser#parse(String) -- Regards, Shalin Shekhar Mangar.
