Hey Soumya,
I needed exactly same in my implementation. and hardly 2 days old with 
ElasticSearch. 

Can you please post code snippet you used in mapping and then to fetch 
unique values?

Thanks in advance.


On Thursday, February 20, 2014 12:39:08 PM UTC+5:30, soumya sengupta wrote:
>
> Thanks, that worked
>
>
> On Wed, Feb 19, 2014 at 5:41 PM, aash dhariya <[email protected] 
> <javascript:>> wrote:
>
>> You can set the type of the field as multi_field. For example:
>>
>>
>> "value" : {
>>             "type" : "multi_field",
>>             "fields" : {
>>               "value" : {
>>                 "type" : "string",
>>                 "analyzer" : "custom_ngram_analyzer"
>>               },
>>               "value_untouched" : {
>>                 "type" : "string",
>>                 "index" : "not_analyzed",            
>>               }
>>             }
>>           }
>>
>> Now, you can compute the facets for value.value_untouched and for search 
>> you can simple use value.
>>
>> To learn more about multi_field, you can visit:
>>
>>
>> http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/mapping-multi-field-type.html
>>
>>
>> On Wed, Feb 19, 2014 at 5:02 PM, soumya sengupta <[email protected] 
>> <javascript:>> wrote:
>>
>>> I have got an ngram-analyzer for the field which is preventing me from 
>>> using facets.
>>> What options do I have ?
>>>
>>>
>>> On Wednesday, February 19, 2014 4:36:13 PM UTC+5:30, geeky_sh wrote:
>>>
>>>> You could use facet query to get all the unique values for a particular 
>>>> field. Though you will get the counts too.
>>>>
>>>>
>>>> On Wed, Feb 19, 2014 at 3:21 PM, soumya sengupta <[email protected]> 
>>>> wrote:
>>>>
>>>>> How to get unique or distinct values from elastic search query ?
>>>>> I want to get all the unique vales and not their total count.
>>>>>  
>>>>> -- 
>>>>> 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 [email protected].
>>>>>
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/elasticsearch/00a45aff-6d67-40ae-8c54-e00481011bce%
>>>>> 40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Thanks, 
>>>> Aash
>>>>  
>>>  -- 
>>> 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 [email protected] <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elasticsearch/d798c2f3-c460-45f1-a83a-fcb5180f40c9%40googlegroups.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> -- 
>> Thanks, 
>> Aash
>>  
>> -- 
>> 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/VL0Zn9kXzbk/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/CAG7ZG_fgm2DV1paXe_OiH7fcKPe0M3bYA8Jr7VMHqxiqZFtmNA%40mail.gmail.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Soumya Sen Gupta
>  

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/acb62c3d-00d7-4f7a-9b3e-08d64aeb82bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to