Hi, I'm trying to understand how and where store documents and percolate queries for these documents.
According to this documentation it's possible to create a new field in the index mapping with
percolator data type. We also should have defined mapping in the index for the fields we're using in the percolate query.
Since ES 6.x removes the concept of types, one option is to store documents and queries inside a single index. Sounds good, but have a couple of questions here:
When we will store queries, we will store single
queryfield, and all other fields will be empty, is it true and is it okay?
How generate document ids? For example, if we store a couple of documents with ids = 1, 2, 3, ... etc. what ids we will use for percolate queries?
Another option is to store percolate queries in the different index, but in this case we should also place the same mapping as we use in the index for our documents, and it may be not easy to maintain these mappings in both indices: for documents and percolate queries.
What's the best? Is there some other way?
Thanks for your answers in advance!