I think your issue is that you are also applying the edge n-gram filter at
search time. So "happy" is translated to ("ha" OR "hap" OR "happ" OR
"happy"). You need to configure your mappings with a search analyzer[1]
which is the same analyzer but without the edge-ngram filter (so just
keyword and lowercase).
On a side note, you would benefit from putting the lowercase filter in
front of your n-gram filter. This way, the lowercasing would be done only
once.
But now when i type "hap" it doesn't return the following after i
configure with search_analzyer :
1)Happy 2)Happy birthday 3)Happy valentine
Sorry maybe i have missed the requirements at the first place. Basically i
wanted to use the edge_ngram to achieve auto-completion not full-text
matching.
I think your issue is that you are also applying the edge n-gram filter at
search time. So "happy" is translated to ("ha" OR "hap" OR "happ" OR
"happy"). You need to configure your mappings with a search analyzer[1]
which is the same analyzer but without the edge-ngram filter (so just
keyword and lowercase).
On a side note, you would benefit from putting the lowercase filter in
front of your n-gram filter. This way, the lowercasing would be done only
once.
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
As Adrien said don't apply the edge n-gram filter at search time. When you
tried it what does you mapping look like, because "hap" should return a
result.
Dan
On Monday, April 28, 2014 12:41:38 PM UTC+1, cyrilforce wrote:
How I could get only the relevant result with the sorting via edge ngram ?
Thanks
On Apr 28, 2014 7:36 PM, "Dan Tuffery" <dan.t...@gmail.com <javascript:>>
wrote:
To return the query results in the order you want, execute the sort on a
not_analyzed version of the term, i.e
Not sure whether i have same understanding "edge n-gram filter at search
time" refer to apply edge n-gram filter in the query ? If this is the case
i think i didn't apply any analyzer in the query :
As Adrien said don't apply the edge n-gram filter at search time. When you
tried it what does you mapping look like, because "hap" should return a
result.
Dan
On Monday, April 28, 2014 12:41:38 PM UTC+1, cyrilforce wrote:
--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/elasticsearch/fhsCgFBF76E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
the DISPLAY_NAME term will be indexed using
'edge_ngram_keyword_lowercase_analyzer'. When you search on DISPLAY_NAME
On Monday, April 28, 2014 2:31:24 PM UTC+1, cyrilforce wrote:
Hi Dan,
Not sure whether i have same understanding "edge n-gram filter at search
time" refer to apply edge n-gram filter in the query ? If this is the
case i think i didn't apply any analyzer in the query :
however with this configuration it wasn't able to search via "hap" to
return the following result :
1)Happy 2)Happy birthday 3)Happy valentine
Thanks
On Mon, Apr 28, 2014 at 8:17 PM, Dan Tuffery <dan.t...@gmail.com<javascript:>
wrote:
As Adrien said don't apply the edge n-gram filter at search time. When
you tried it what does you mapping look like, because "hap" should return a
result.
Dan
On Monday, April 28, 2014 12:41:38 PM UTC+1, cyrilforce wrote:
--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/elasticsearch/fhsCgFBF76E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
the DISPLAY_NAME term will be indexed using
'edge_ngram_keyword_lowercase_analyzer'. When you search on DISPLAY_NAME
On Monday, April 28, 2014 2:31:24 PM UTC+1, cyrilforce wrote:
Hi Dan,
Not sure whether i have same understanding "edge n-gram filter at
search time" refer to apply edge n-gram filter in the query ? If this
is the case i think i didn't apply any analyzer in the query :
As Adrien said don't apply the edge n-gram filter at search time. When
you tried it what does you mapping look like, because "hap" should return a
result.
Dan
On Monday, April 28, 2014 12:41:38 PM UTC+1, cyrilforce wrote:
--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/elasticsearch/fhsCgFBF76E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
the DISPLAY_NAME term will be indexed using
'edge_ngram_keyword_lowercase_analyzer'. When you search on DISPLAY_NAME
On Monday, April 28, 2014 2:31:24 PM UTC+1, cyrilforce wrote:
Hi Dan,
Not sure whether i have same understanding "edge n-gram filter at
search time" refer to apply edge n-gram filter in the query ? If this
is the case i think i didn't apply any analyzer in the query :
As Adrien said don't apply the edge n-gram filter at search time. When
you tried it what does you mapping look like, because "hap" should return a
result.
Dan
On Monday, April 28, 2014 12:41:38 PM UTC+1, cyrilforce wrote:
--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/elasticsearch/fhsCgFBF76E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
the DISPLAY_NAME term will be indexed using
'edge_ngram_keyword_lowercase_analyzer'. When you search on DISPLAY_NAME
On Monday, April 28, 2014 2:31:24 PM UTC+1, cyrilforce wrote:
Hi Dan,
Not sure whether i have same understanding "edge n-gram filter at
search time" refer to apply edge n-gram filter in the query ? If this
is the case i think i didn't apply any analyzer in the query :
As Adrien said don't apply the edge n-gram filter at search time. When
you tried it what does you mapping look like, because "hap" should return a
result.
Dan
On Monday, April 28, 2014 12:41:38 PM UTC+1, cyrilforce wrote:
--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/elasticsearch/fhsCgFBF76E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.