Fuzziness in text_phrase query


(Yannick Smits-2) #1

It seems fuzziness can only be applied to the boolean variant of the new
text query. Is there a way to do a text_phrase query with fuzziness
settings?

This is what I tried:

{ "query":{

"text" : {

    "_all" : {

        "query" : "this is my phrese",

        "type" : "phrase",

        "fuzziness": 0.5

    }

}

}

}

Thanks,

Yannick


(Shay Banon) #2

No, there isn't an option to do that.
On Thursday, May 19, 2011 at 5:04 PM, Yannick Smits wrote:

It seems fuzziness can only be applied to the boolean variant of the new text query. Is there a way to do a text_phrase query with fuzziness settings?

This is what I tried:

{ "query":{
"text" : {
"_all" : {
"query" : "this is my phrese",
"type" : "phrase",
"fuzziness": 0.5
}
}
}
}

Thanks,
Yannick


(Yannick Smits-2) #3

Is that technically difficult to implement (performance) or is the feature just missing but might get there in the future? Maybe with Lucene 4?

From: Shay Banon [mailto:shay.banon@elasticsearch.com]
Sent: donderdag 19 mei 2011 20:10
To: users@elasticsearch.com
Subject: Re: fuzziness in text_phrase query

No, there isn't an option to do that.

On Thursday, May 19, 2011 at 5:04 PM, Yannick Smits wrote:

It seems fuzziness can only be applied to the boolean variant of the new text query. Is there a way to do a text_phrase query with fuzziness settings?

This is what I tried:

{ "query":{

"text" : {

    "_all" : {

        "query" : "this is my phrese",

        "type" : "phrase",

        "fuzziness": 0.5

    }

}

}

}

Thanks,

Yannick


(Shay Banon) #4

Need to dive into code to check if its possible. Should be, but yea, perf would suck.
On Thursday, May 19, 2011 at 9:31 PM, Yannick Smits wrote:

Is that technically difficult to implement (performance) or is the feature just missing but might get there in the future? Maybe with Lucene 4?

From: Shay Banon [mailto:shay.banon@elasticsearch.com]
Sent: donderdag 19 mei 2011 20:10
To: users@elasticsearch.com
Subject: Re: fuzziness in text_phrase query

No, there isn't an option to do that.
On Thursday, May 19, 2011 at 5:04 PM, Yannick Smits wrote:

It seems fuzziness can only be applied to the boolean variant of the new text query. Is there a way to do a text_phrase query with fuzziness settings?

This is what I tried:
{ "query":{
"text" : {
"_all" : {
"query" : "this is my phrese",
"type" : "phrase",
"fuzziness": 0.5
}
}
}
}

Thanks,
Yannick


(system) #5