Delete few documents out of many before inserting with single index


(Shishir Kumar) #1

Hi,

We have a single index, single type set up. Documents are identified based on id and some fields.
Ex:
index: geo
type: geographies

documents =>

_id: "provider-1-555"
_source: {
zip: "555",
"provider": "provider-1",
"regions": [list of regions]
}

_id: "provider-2-444"
_source: {
zip: "444",
"provider": "provider-2",
"regions": [list of regions]
}

We get couple of feeds from different providers which we are inserting to ElasticSearch. What we want is to delete all the existing documents before inserting new data for a single provider without down time.
I think alias works well in such cases but not sure if it can be used or how to use it in single index setup like ours.

How we can achieve this with current setup?

Thanks.


(Mark Walkom) #2

I'd use aliases with multiple indices, otherwise it's a bit of a pain to do what you want with DBQ/


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.