Hello I am trying to save percolator query with code which looks like this "query": "Content.\\*:apple OR android"
but i got error response which looks like this No field mapping can be found for the field with name [Content.*].
If I try to use search using this exact query it works. And if I will save percolate query with single words endlosed in parenthesis it works too.
I did not managed to found any solution nor issue on github or topic in disussion.
Here is example of code which I am trying to run and don´t work:
Hello,
Thank you for response!
Our version of ES is 7.14.2. I wast trying narrow down our business mapping until I came across very first exampple of percolating on documentation page. I only changed type of matching documents from terms to query string query.
Create an index with two fields:
PUT /my-index-000001
{
"mappings": {
"properties": {
"message": {
"type": "text"
},
"query": {
"type": "percolator"
}
}
}
}
Register a query in the percolator:
PUT /my-index-000001/_doc/1?refresh
{
"query": {
"query_string": {
"query": "bonsai tree"
}
}
}
Where I got this (same) error .
No field mapping can be found for the field with name [*]
By switching to a query_string you changed the query actually. The match query only searches in the message field, by not specifying a field in the query_string query it tries to query all fields, and that is failing. Try using concrete field.
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.