Language specific analyzer in the query

Hi,

I have a document with different text fields. For example I have a text
field for french text (text_fr) which has a french analyzer set in the
mapping. Once the indexing is done and I try to query the; field specific
(text_fr:"xyz") querying works well with fuzziness (searching for word
"person" will return the documents with "personne"). However if I do a all
search with "person" it doesn't return anything. I tried applying french
analyzer for the query but no results.

Any pointers to what I am missing will be of great help.

Cheers

--
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/4d38596f-6ceb-45ec-923c-885b82320f06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

For example,

I have a field named text_fr (french analyzed), when I search with:

{
"query": {
"query_string": {
"query": "person",
"_name": "person",
"analyzer": "french"
}
}
}

I dont get any results. However if I search with

{
"query": {
"query_string": {
"query": "text_fr:person",
"_name": "text_fr:person"
}
}
}

Is there a away I can retrieve the documents with "personne" (documents
retrieved in the second query) by using all (not field specific) query.
Hope this adds more info on my use case.
On Wednesday, April 1, 2015 at 10:40:24 AM UTC-7, werewolf420 wrote:

Hi,

I have a document with different text fields. For example I have a text
field for french text (text_fr) which has a french analyzer set in the
mapping. Once the indexing is done and I try to query the; field specific
(text_fr:"xyz") querying works well with fuzziness (searching for word
"person" will return the documents with "personne"). However if I do a all
search with "person" it doesn't return anything. I tried applying french
analyzer for the query but no results.

Any pointers to what I am missing will be of great help.

Cheers

--
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/60be99e5-575a-477d-ae6c-f699bd643bae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I was able to repro that. It looks like the "analyzer" attribute is not
picked up by the "query_string" query.
Any thoughts? Should we create a github issue?

On Wednesday, April 1, 2015 at 11:12:26 AM UTC-7, werewolf420 wrote:

For example,

I have a field named text_fr (french analyzed), when I search with:

{
"query": {
"query_string": {
"query": "person",
"_name": "person",
"analyzer": "french"
}
}
}

I dont get any results. However if I search with

{
"query": {
"query_string": {
"query": "text_fr:person",
"_name": "text_fr:person"
}
}
}

Is there a away I can retrieve the documents with "personne" (documents
retrieved in the second query) by using all (not field specific) query.
Hope this adds more info on my use case.
On Wednesday, April 1, 2015 at 10:40:24 AM UTC-7, werewolf420 wrote:

Hi,

I have a document with different text fields. For example I have a text
field for french text (text_fr) which has a french analyzer set in the
mapping. Once the indexing is done and I try to query the; field specific
(text_fr:"xyz") querying works well with fuzziness (searching for word
"person" will return the documents with "personne"). However if I do a all
search with "person" it doesn't return anything. I tried applying french
analyzer for the query but no results.

Any pointers to what I am missing will be of great help.

Cheers

--
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/f8d076ce-08ca-479f-974d-4dc0b498e386%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.