lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabiano Nunes <fabi...@nunes.me>
Subject Re: Fuzzy Phrase
Date Sun, 26 Sep 2010 22:19:46 GMT
Thank you, Schindler.
When combining queries, I need two strings, one for each field. I want to
use just one string like -- head:"hello~ world"~3 AND contents:"colorless~
green~ ideas~".

When I this string query within ComplexPhraseQuery, I get the exception:
 -- ParseException: Cannot parse 'hello~ world': Cannot have clause for
field "content" nested in phrase  for field "head"

But, If I use -- head:hello AND head:world AND contents:"colorless~ green~
ideas~" -- no errors occurred.


On Sun, Sep 26, 2010 at 2:57 PM, Uwe Schindler <uwe@thetaphi.de> wrote:

> Hi,
>
> You can combine two different ComplexPhraseQueries for both fields using an
> BooleanQuery with Occur.MUST.
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: falha404@gmail.com [mailto:falha404@gmail.com] On Behalf Of
> > Fabiano Nunes
> > Sent: Sunday, September 26, 2010 10:32 AM
> > To: java-user@lucene.apache.org
> > Subject: Fuzzy Phrase
> >
> > Is it possible to search for fuzzy phrase queries like -- "colorless~
> green~
> > ideas~" -- ?
> > I have had some success with ComplexPhraseQuery, but I can't use it for
> > querying two fields at same time, ie, -- head:"hello~ world"~3 AND
> > contents:"colorless~ green~ ideas~" --
> >
> > Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message