lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pulkit Singhal <pulkitsing...@gmail.com>
Subject How to combine QueryParser and Wildcard search
Date Thu, 18 Nov 2010 15:36:50 GMT
Hello,

I was wondering if there is any API call in Lucene that allows
something like the following:

Step 1: Take the user input
"hello world" you are beautiful

Step 2: QueryParser does its thing
defaultField:hello world defaultField:you defaultField:are
defaultField:beautiful

Step 3: And somehow a desired transformation like the following one is
the next thing to happen:
defaultField:hello world defaultField:you* defaultField:are*
defaultField:beautiful*

How can I tell QueryParser to throw in the wildcard "*" expression
where applicable?

You can see that I'm not expecting it to use "*" with something that
will turn into a phrase query:
"hello world" becomes defaultField:hello world
Just the rest of the tokens:
defaultField:you* defaultField:are* defaultField:beautiful*

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message