If you have both number and string fields and you try and multimatch it , it will fail on the low level call. I am not sure if it fails on converting the string to the int for comparision or what. I assumed it would ignore that since a string "test" doesnt have a valid number to convert to
I have seen other questions with no answers. I do not want to convert all my fields to string to have it work correctly
I have tried that running the latest version of ES and get the same 400 transport error as the user posted. Also looking at the doc it looks like by default lenient is set to true
I have tried with Lenient set to true and still get the same error
Here is what i have in my instance
"ticketName":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"ticketNumber":{"type":"long"}}
Here is my code block c#
var searchResponse = _client.Search<ES_Ticket>(s => s
.From(0)
.Size(10)
.Query(q => q
.MultiMatch(m => m
.Query("test")
.Fields(f => f.Field(p => p.ticketNumber).Field("ticketName"))
)
).Lenient(true)
);
Here is my result. As you can see exception is a 400
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.