In other queries I have used the TermsQueryField. But when I use it in combination with the FunctionScore and Function I am getting this error. How can I solve this?
Thank you!
this looks like a dependency issue. Please double check if you are using the latest version of Elastic.Clients.Elasticsearch and the latest compatible Elastic.Transport (and make sure to consistently use the same versions in all sub-packages). Sometimes it as well helps to clean the solution and doing a full rebuild.
Hi @flobernd
Thanks for your reply! I had been using Elastic.Client.Elasticsearch version 8.13.12. So I tried to update that to the newest version 8.14.6. But then I am getting an error using term after terms, which till now I didn't have a problem. So the following code I was using up to now:
this forced me to change the second terms to term as follows: filter => filter.Terms(t => t.Field(f => f.num).**Term**(new TermsQueryField(numbers.Select(number => FieldValue.Long(number)).ToArray())))
I didn't see any documentation regarding this. Is this due to the upgrade? And if so where can I find this documentation, because I didn't see it on the website.
After changing terms to term I did manage to have the funcitonScore together with the TermsQueryField
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.