I don't understand why we need to define fields of the percolated document on the same mapping of the percolate type.
If these fields are just used to "preprocess the document defined in the percolator query ", Why the percolate type doesn't take the percolated document mapping as settings ? It will be much easier.
Hi @pulse14, when the percolate query is percolating a document it indexes it into a temporary in-memory index. In order to do that the percolate query needs to know how to index that document and for this reason it needs a mapping. Currently it uses the mapping the percolator field is defined in.
I agree it would be more clear to understand if the percolator field could accept field definitions / mapping. At least then the context is more clear. However that is currently difficult to do with how internally in ES things are structured.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.