Hi, i have a index with multiple documents with severeal fields. I want to be able to search over all the fields without using multi_match and manualy writing each field. Is there a way to do this?
Here is an example of how it would be done with multi_match, but i get errors since the fields have different types.
GET new_document-20_v2/_search
{
"query": {
"multi_match" : {
"query": "2008",
"fields": ["Document name", "Project number", ....(etc, i have about 30 fields)]
}
}
}
Thank you for the anwser!
This worked to some degree. But it did not return all the results.
After running a simple_query_string on the query 2008. The search only returns two documents, even though i have alot more documents than two that contains fields with "2008" in them.
I also tried to include 'size' and set it to 1000, but this did nothing.
Is it posible to query in a way that returns all the results?
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
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.