lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: QueryParser, double quotes and wilcard inside the double quotes
Date Tue, 03 Jul 2012 17:11:32 GMT
You can use the QueryParser proximity feature e.g. "foo test"~n where
n is the max distance you want them to be apart.  Or look at the
SpanQuery stuff e.g. SpanNearQuery.


--
Ian.


On Tue, Jul 3, 2012 at 4:59 PM, Jochen Hebbrecht
<jochenhebbrecht@gmail.com> wrote:
> Hi all,
>
> Imagine you have the following books which are indexed using Lucene
>
> book1 -> title: "foo bar test"
> book2 -> title: "foo barrr test"
> book3 -> title: "foo bar bar"
>
> I want to find book1 and book2 using the following query "foo * test". But
> if I pass this string to the QueryParser, the QueryParser seems to be
> searching for a literal '*' character.
> Any idea's how to fix this?
>
> Thanks!
> Jochen

---------------------------------------------------------------------
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