Elastic Search .Net client doesnt have Fuzziness?

Hello,

Im having trouble with adding Fuzziness to my Match query, see the below code:

 var client = new ElasticsearchClient(new Uri("http://elasticsearch:9200"));

            var response = await client.SearchAsync<ExceptionLog>(s => s
               .Index("exceptions")
               .From(0)
               .Size(1000)
               .Query(q => q
                    .Bool(b => b
                       .Must(m => m
                       .Match(ma => ma
                            .Field("message")
                            .Query(message)
                            .Operator(Operator.Or)
                            .Fuzziness(Fuzziness.) //i want here AUTO fuzziness but it only has Equals and ReferenceEquals.
                            .ZeroTermsQuery(ZeroTermsQuery.All)
                       )
                    )
               )
                    )
               .Sort(sort => sort
                   .Field("createDate", new FieldSort { Order = SortOrder.Desc })
               )
               );

Below is the normal query that works fine, but how to get it in my .net code:

 {
        "match": {
            "message": {
                    "query": "",
                    "operator": "or",
                    "fuzziness": "AUTO",
                    "zero_terms_query": "all"
                }
            }
        },

Im using Elasticsearch net 8.9.3 : GitHub - elastic/elasticsearch-net: This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.

I already tried without fuzziness (maybe its by default Auto) but that doesn't work.

Any help is really appreciated! Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.