You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by entdeveloper <ca...@gmail.com> on 2011/06/29 05:00:10 UTC

Fuzzy Query Param

According to the docs on lucene query syntax:

"Starting with Lucene 1.9 an additional (optional) parameter can specify the
required similarity. The value is between 0 and 1, with a value closer to 1
only terms with a higher similarity will be matched."

I was messing around with this and started doing queries with values greater
than 1 and it seemed to be doing something. However I haven't been able to
find any documentation on this.

What happens when specifying a fuzzy query with a value > 1?

"tiger"~2
"animal"~3

--
View this message in context: http://lucene.472066.n3.nabble.com/Fuzzy-Query-Param-tp3120235p3120235.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Fuzzy Query Param

Posted by steffen_kmt <st...@komoot.de>.
entdeveloper wrote:
> 
> I'm using Solr trunk. 
> 

Hi!

I'm using solr 3.1.0 and the feature is not implemented. 
When I search for a word with e.g. ~2 the "~2" is interpreted as part of the
search string. 
Where can I get the trunk version? Is it a stable version or just for
testing purposes?

thanks a lot,

steffen



--
View this message in context: http://lucene.472066.n3.nabble.com/Fuzzy-Query-Param-tp3120235p3178565.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Fuzzy Query Param

Posted by Michael McCandless <lu...@mikemccandless.com>.
Good question... I think in Lucene 4.0, the edit distance is (will be)
in Unicode code points, but in past releases, it's UTF16 code units.

Mike McCandless

http://blog.mikemccandless.com

2011/6/30 Floyd Wu <fl...@gmail.com>:
> if this is edit distance implementation, what is the result apply to CJK
> query? For example, "您好"~3
>
> Floyd
>
>
> 2011/6/30 entdeveloper <ca...@gmail.com>
>
>> I'm using Solr trunk.
>>
>> If it's levenstein/edit distance, that's great, that's what I want. It just
>> didn't seem to be officially documented anywhere so I wanted to find out
>> for
>> sure. Thanks for confirming.
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Fuzzy-Query-Param-tp3120235p3122418.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>

Re: Fuzzy Query Param

Posted by Floyd Wu <fl...@gmail.com>.
if this is edit distance implementation, what is the result apply to CJK
query? For example, "您好"~3

Floyd


2011/6/30 entdeveloper <ca...@gmail.com>

> I'm using Solr trunk.
>
> If it's levenstein/edit distance, that's great, that's what I want. It just
> didn't seem to be officially documented anywhere so I wanted to find out
> for
> sure. Thanks for confirming.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Fuzzy-Query-Param-tp3120235p3122418.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Fuzzy Query Param

Posted by entdeveloper <ca...@gmail.com>.
I'm using Solr trunk. 

If it's levenstein/edit distance, that's great, that's what I want. It just
didn't seem to be officially documented anywhere so I wanted to find out for
sure. Thanks for confirming.

--
View this message in context: http://lucene.472066.n3.nabble.com/Fuzzy-Query-Param-tp3120235p3122418.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Fuzzy Query Param

Posted by Michael McCandless <lu...@mikemccandless.com>.
Which version of Solr (Lucene) are you using?

Recent versions of Lucene now accept ~N > 1 to be edit distance.  Ie
foobar~2 matches any term that's <= 2 edit distance away from foobar.

Mike McCandless

http://blog.mikemccandless.com

On Tue, Jun 28, 2011 at 11:00 PM, entdeveloper
<ca...@gmail.com> wrote:
> According to the docs on lucene query syntax:
>
> "Starting with Lucene 1.9 an additional (optional) parameter can specify the
> required similarity. The value is between 0 and 1, with a value closer to 1
> only terms with a higher similarity will be matched."
>
> I was messing around with this and started doing queries with values greater
> than 1 and it seemed to be doing something. However I haven't been able to
> find any documentation on this.
>
> What happens when specifying a fuzzy query with a value > 1?
>
> "tiger"~2
> "animal"~3
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Fuzzy-Query-Param-tp3120235p3120235.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>