Yes I try. Actually I am using PHP API. So its return error. Here"s my
query:
$s = "{
      "Query" : {
            "Prefix" : { "countries.name.untouched" : "IN" }
}

}";
On Apr 3, 2015 9:05 PM, "Aaron Mefford" <aa...@mefford.org> wrote:

> Have you tried Countries.Name.Untouched?
>
> On Friday, April 3, 2015 at 9:06:17 AM UTC-6, James Crone wrote:
>>
>> I have try analyzer on specific index field by creating multifield. And
>> it looks like:
>> "Countries" : {
>>        "Properties" : {
>>                 "Name" : {
>>                     "Type" : "string",
>>                    "Fields" : {
>>             "Untouched" : {
>>               "Type" : "string",
>>                "Index" : "no_anylzer"
>> }
>> }
>> }
>>         }
>>
>> }
>>
>> Is it true? If yes how can I query for this field?
>> On Apr 3, 2015 7:39 PM, "Adrien Grand" <adr...@elastic.co> wrote:
>>
>>> This is because of your analyzer: it splits "BRITISH INDIAN OCEAN
>>> TERRITORY" into ["british", "indian", "ocean", "territory"] and one of
>>> these terms ("indian") starts with "in".
>>>
>>> What you probably want is to apply an analyzer that only does
>>> lowercasing, for instance by wrapping a keyword tokenizer and a lowercase
>>> token filter.
>>>
>>> On Fri, Apr 3, 2015 at 2:34 PM, James Crone <araf...@gmail.com> wrote:
>>>
>>>> prefix query is not returning the correct results..
>>>> in ISO Country data.. my query was
>>>>
>>>> {"query":{"bool":{"must":[{"prefix":{"country.name":"in"}}],
>>>> "must_not":[],"should":[]}},"from":0,"size":50,"sort":[],"facets":{}}
>>>> and the returned result is:
>>>> { took: 3 timed_out: false _shards: { total: 5 successful: 5 failed: 0
>>>> } hits: { total: 3 max_score: 1 hits: [ { _index: restdb _type:
>>>> country _id: sX3-aNGBQaOjo-L7zNj7qQ _score: 1_source: { id: 519fcbc
>>>> e820ea8950373612b code: ID name: INDONESIA } }{ _index: restdb _type:
>>>> country _id: YMXpIxaPRzmkMZqaKQ36pw _score: 1_source: { id:
>>>> 519fcbce820ea895037360e4 code: IO name: *BRITISH INDIAN OCEAN
>>>> TERRITORY* }}{ _index: restdb _type: country _id: Ok9MHCr4RLq
>>>> jH6oFLX92EA _score: 1_source: { id: 519fcbce820ea8950373612a code: IN
>>>> name: INDIA }}
>>>> ] } }
>>>>
>>>> As, you can see, red coloured data, is not matching prefix query..
>>>> Am i correct i need to do something else.., if not please help me to
>>>> find out correct way to do so, else, give me go ahead, to post this as bug.
>>>>
>>>> --
>>>> 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.
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/elasticsearch/13ab0a36-4e87-4cc2-89e2-0abe39f13668%
>>>> 40googlegroups.com
>>>> <https://groups.google.com/d/msgid/elasticsearch/13ab0a36-4e87-4cc2-89e2-0abe39f13668%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Adrien
>>>
>>> --
>>> 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/pQaVv3-jMXs/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> elasticsearc...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/elasticsearch/CAO5%3DkAhbu1_v5yxGqhVR%
>>> 3DXeb7tf30b4OWGTmyP93eTQX6LQKgA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/elasticsearch/CAO5%3DkAhbu1_v5yxGqhVR%3DXeb7tf30b4OWGTmyP93eTQX6LQKgA%40mail.gmail.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 a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/pQaVv3-jMXs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/e3101f56-5d4f-45f8-a09d-8e5b7f3e38ed%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/e3101f56-5d4f-45f8-a09d-8e5b7f3e38ed%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CABjqkR-%2BNNq_dWeTrax5400URokLi_bSf6G4r4HxKZC%3DD%3DnYTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to