lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: Fuzzy Phrase
Date Mon, 27 Sep 2010 13:36:59 GMT
There is a SpanFuzzyQuery for Lucene 1.9 from 2006 in LUCENE-522.


	karl

27 sep 2010 kl. 00.19 skrev Fabiano Nunes:

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


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