Query String with - _ symbols

Hi,
I setup my index using standard tokenizer & two filter [ asciifolding &
lowercase]
I index data with - _ symbols, eg: abc-xyz, abc_xyz
Then I use query_string to search:

If my query is: - or _ then nothing found (fine)
But if my query is: 045 or 095 (ascii code of 2 above symbols)
then my result will abc-xyz or abc_xyz

I think it's look like query_string had search on store field not in
analyzed field isn't it ?

What should I do to avoid this problem ?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ef5bdca2-79fa-48ce-a9d3-52d5992ac456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

query_string uses the same analyzer you used at index time. But if you don't set the field you are querying on, it will use _all field which could have a different analyzer.

Elasticsearch does not search on stored field.

That said, I don't fully understand what you are doing here. Could you gist a full curl recreation?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 mars 2014 à 06:30, kidkid zkidkid@gmail.com a écrit :

Hi,
I setup my index using standard tokenizer & two filter [ asciifolding & lowercase]
I index data with - _ symbols, eg: abc-xyz, abc_xyz
Then I use query_string to search:

If my query is: - or _ then nothing found (fine)
But if my query is: 045 or 095 (ascii code of 2 above symbols)
then my result will abc-xyz or abc_xyz

I think it's look like query_string had search on store field not in analyzed field isn't it ?

What should I do to avoid this problem ?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ef5bdca2-79fa-48ce-a9d3-52d5992ac456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CC814BB9-488E-419F-BCE4-EA7581CDAA3E%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Hi David Pilato,
It's what I read from Mastering Elasticsearch. I think the problem is
Frontend dev have used an custom encode to trip html data.
Thanks

On Monday, March 31, 2014 1:00:18 PM UTC+7, David Pilato wrote:

query_string uses the same analyzer you used at index time. But if you
don't set the field you are querying on, it will use _all field which could
have a different analyzer.

Elasticsearch does not search on stored field.

That said, I don't fully understand what you are doing here. Could you
gist a full curl recreation?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 mars 2014 à 06:30, kidkid <zki...@gmail.com <javascript:>> a écrit :

Hi,
I setup my index using standard tokenizer & two filter [ asciifolding &
lowercase]
I index data with - _ symbols, eg: abc-xyz, abc_xyz
Then I use query_string to search:

If my query is: - or _ then nothing found (fine)
But if my query is: 045 or 095 (ascii code of 2 above symbols)
then my result will abc-xyz or abc_xyz

I think it's look like query_string had search on store field not in
analyzed field isn't it ?

What should I do to avoid this problem ?

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/ef5bdca2-79fa-48ce-a9d3-52d5992ac456%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/ef5bdca2-79fa-48ce-a9d3-52d5992ac456%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7dfb46d0-8005-4288-b0f8-340b1688f814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.