After upgrading to a new cluster running Elasticsearch 6.0, from a cluster running 5.4, I'm running into a persistent 400 Error with the message when attempting to run my previously-working Query on the new cluster:
parsing_exception Reason: [match] query does not support [type]
I've attempted to add the lenient flag to all of my Match queries, but it has made no difference. Any insight?
.Query(q => q
.Bool( b => b
.Should(s => s
.MatchPhrase(m => m
.Query(searchTerm)
.Field(fi => fi.Items.First().Id)
.Lenient(true)),
s => s
.Match(m =>m
.Query(date)
.Field(fi => fi.CustomAttributes["Expiration"])
.Lenient(true)),
s => s
.Fuzzy(f => f
.Value(searchTerm)
.Field(fi => fi.Items.First().Cat)
),
s => s
.MatchPhrase(c => c
.Query(searchTerm)
.Field(fi => fi.Name)
.Analyzer("synonym_analyzer")
.Fuzziness(Fuzziness.EditDistance(2))
.Lenient(true)
),
s => s.
MatchPhrasePrefix(p => p
.Field(fi => fi.Name)
.Query(searchTerm)
.Analyzer("synonym_analyzer")
.Boost(0.8)
.Lenient(true))
)))
The beta1 of NEST for Elasticsearch 6.x has just come out, so that's your best option at the moment. I assume you're still on a stable NEST version, which is only compatible with 5.x, right?
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.