Reputation: 86
A similar question was asked here. However, I'm having trouble with the decay functions.
Why does this work ...
_client.Search<object>(s => s
.Query(q => q
.FunctionScore(fs => fs
.Functions(f => f
.ScriptScore(ss => ss.Script("1"))
.Filter(ff => ff.Term("a", "b")))
.BoostMode(FunctionBoostMode.sum))));
but this doesn't?
_client.Search<object>(s => s
.Query(q => q
.FunctionScore(fs => fs
.Functions(f => f
.Gauss(p => "someField", g => g.Origin("0").Offset("1"))
.Filter(ff => ff.Term("a", "b")))
.BoostMode(FunctionBoostMode.sum))));
Error: 'Nest.FunctionScoreFunction' does not contain a definition for 'Filter' and no extension method 'Filter' accepting a first argument of type 'Nest.FunctionScoreFunction' could be found (are you missing a using directive or an assembly reference?)
Also, I don't think the syntax on the first parameter of the Gauss function is correct (even when the filter is removed). Is there a good example of correct syntax for that function?
Upvotes: 0
Views: 655