ExponentialDate function in new .Net client for v.8

I'm trying to migrate older .Net code using the NEST client to adopting the new Elastic.Clients.Elasticsearch .Net client but I'm having problem implementing the ExponentialDate function.

In our prior solution, we had a question that looked like this.

...
                     .FunctionScore(functionScore => functionScore
                         .Functions(f => f
                             .ExponentialDate(func => func
                                 .Filter(filter => filter
                                     .Bool(b => b
                                         .Must(m => m
                                             .Exists(e => e
                                                 .Field("createdAt")
                                             )
                                         )
                                     )
                                 )
                                 .Decay(0.75)
                                 .Scale("3000d")
                                 .Field("createdAt")
                             )
                         )
                         .Query(q => q.
...

When I'm trying to implement the same kind of code in the new client, I notice that the ExponentialDate function has not been implemented yet, and the underlying classes has been marked internal as not to implement additional classes. The implemented functions are (Weight, RandomScore, ScriptScore, WeightScore, FieldValueFactor)

Is there anyway I can make this happen in the new version as well?

Still looking for creative solutions here, but for what it's worth, I solved the issue as follows.

Since the client is managed as an open source project, I cloned the repo and added the needed function in quite a crude way. It does not implement any of the other functionscore functions, and only implements the parts that I know we're using in our solution, but until something changes there (and developers will be confused if they don't read the documentation and I'm not around to explain why :sweat_smile:) it solves my problem.

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