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 Mhd Wrk <mh...@gmail.com> on 2013/12/10 23:05:01 UTC

Edismax and prefixlen for fuzzy queries

Does edismax query parser support prefixlen (length of common (non-fuzzy)
prefix)?

Thanks

Re: Edismax and prefixlen for fuzzy queries

Posted by Furkan KAMACI <fu...@gmail.com>.
Hi;

I've read the issue. When I have time I will apply a patch for it.

Thanks;
Furkan KAMACI


11 Aralık 2013 Çarşamba tarihinde Ahmet Arslan <io...@yahoo.com> adlı
kullanıcı şöyle yazdı:
> Somehow relevant jira : https://issues.apache.org/jira/browse/SOLR-218
>
>
>
> On Wednesday, December 11, 2013 2:15 AM, Furkan KAMACI <
furkankamaci@gmail.com> wrote:
> Hi;
>
> I've debugged edismax of Solr 4.5.1 and I see that line:
>
> *case FUZZY: return super.getFuzzyQuery(field, val, flt);*
>
> it calls that one:
>
> * // called from parser*
> *  protected Query getFuzzyQuery(String field, String termStr, float
> minSimilarity) throws SyntaxError {*
> *    termStr = analyzeIfMultitermTermText(field, termStr,
> schema.getFieldType(field));*
> *    Term t = new Term(field, termStr);*
> *    return newFuzzyQuery(t, minSimilarity, getFuzzyPrefixLength());*
> *  }*
>
> and getFuzzyPrefixLength() returns that:
>
> *int fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;*
>
> FuzzyQuery.defaultPrefixLength is 0 and *fuzzyPrefixLength *variable's
setter
> is not called anywhere else and that variable's value is not changed..
Here
> is a similar question:
> http://grokbase.com/t/lucene/solr-user/11a7a1bkg1/fuzzy-prefix-length that
> has no answer. If you can not find an answer I can fire a Jira and apply a
> patch for it.
>
> Thanks;
> Furkan KAMACI
>
>
>
> 2013/12/11 Mhd Wrk <mh...@gmail.com>
>
>> Does edismax query parser support prefixlen (length of common (non-fuzzy)
>> prefix)?
>>
>> Thanks
>>
>
>

Re: Edismax and prefixlen for fuzzy queries

Posted by Ahmet Arslan <io...@yahoo.com>.
Somehow relevant jira : https://issues.apache.org/jira/browse/SOLR-218



On Wednesday, December 11, 2013 2:15 AM, Furkan KAMACI <fu...@gmail.com> wrote:
Hi;

I've debugged edismax of Solr 4.5.1 and I see that line:

*case FUZZY: return super.getFuzzyQuery(field, val, flt);*

it calls that one:

* // called from parser*
*  protected Query getFuzzyQuery(String field, String termStr, float
minSimilarity) throws SyntaxError {*
*    termStr = analyzeIfMultitermTermText(field, termStr,
schema.getFieldType(field));*
*    Term t = new Term(field, termStr);*
*    return newFuzzyQuery(t, minSimilarity, getFuzzyPrefixLength());*
*  }*

and getFuzzyPrefixLength() returns that:

*int fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;*

FuzzyQuery.defaultPrefixLength is 0 and *fuzzyPrefixLength *variable's setter
is not called anywhere else and that variable's value is not changed.. Here
is a similar question:
http://grokbase.com/t/lucene/solr-user/11a7a1bkg1/fuzzy-prefix-length that
has no answer. If you can not find an answer I can fire a Jira and apply a
patch for it.

Thanks;
Furkan KAMACI



2013/12/11 Mhd Wrk <mh...@gmail.com>

> Does edismax query parser support prefixlen (length of common (non-fuzzy)
> prefix)?
>
> Thanks
>


Re: Edismax and prefixlen for fuzzy queries

Posted by Furkan KAMACI <fu...@gmail.com>.
Hi;

I've debugged edismax of Solr 4.5.1 and I see that line:

*case FUZZY: return super.getFuzzyQuery(field, val, flt);*

it calls that one:

* // called from parser*
*  protected Query getFuzzyQuery(String field, String termStr, float
minSimilarity) throws SyntaxError {*
*    termStr = analyzeIfMultitermTermText(field, termStr,
schema.getFieldType(field));*
*    Term t = new Term(field, termStr);*
*    return newFuzzyQuery(t, minSimilarity, getFuzzyPrefixLength());*
*  }*

and getFuzzyPrefixLength() returns that:

*int fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;*

FuzzyQuery.defaultPrefixLength is 0 and *fuzzyPrefixLength *variable's setter
is not called anywhere else and that variable's value is not changed.. Here
is a similar question:
http://grokbase.com/t/lucene/solr-user/11a7a1bkg1/fuzzy-prefix-length that
has no answer. If you can not find an answer I can fire a Jira and apply a
patch for it.

Thanks;
Furkan KAMACI


2013/12/11 Mhd Wrk <mh...@gmail.com>

> Does edismax query parser support prefixlen (length of common (non-fuzzy)
> prefix)?
>
> Thanks
>