Hello Anand ,

I dont see any direct way to do this from the query.

The way i have in my mind goes like this


   1. Identify duplicates while indexing. and mark the duplicate feed as
   duplicate. A field names "isDuplicate" : "true/false" would be the best.
   2. While doing search filter out all duplicates.

If the type name is not very important to you , i would advice to store the
type name as a separate field and store all documents on the same type.
This way , you can make the indexing of duplicate elements atmoic using
upserts -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_upserts.html

Thanks
           Vineeth


On Fri, Sep 5, 2014 at 11:00 AM, Anand Natarajan <[email protected]>
wrote:

> We have certain documents stored across multiple types with translated
> values, for example, US and ES types has same document but with different
> values in title fields.
> Example:
> US:
> {
>   "title":"Manning: Spring in Action, Third Edition"
> }
>
> ES:
> {
>  "title":"Manning : Primavera en Acción , Tercera Edición"
> }
>
> So, when I search for "Manning" across all types, I only want one
> document.
>
> I can certainly remove the duplicates in my code, but then I can not use
> pagination.
>
> Any one know how to remove the duplicates?
>
> --
> 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/109a396f-8032-4c03-be4b-b02e004507a2%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/109a396f-8032-4c03-be4b-b02e004507a2%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5mmi_%2BoV5qzeEDGHVaMESiitw9K8iYnL0TXkonR_%3D11Sg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to