We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 583575b commit 49512ceCopy full SHA for 49512ce
src/Nest/DSL/Query/QueryStringDescriptor.cs
@@ -100,7 +100,15 @@ public QueryStringDescriptor<T> OnFieldsWithBoost(
100
});
101
return this.OnFields(fieldNames);
102
}
103
-
+ public QueryStringDescriptor<T> OnFieldsWithBoost(
104
+ Action<FluentDictionary<string, double?>> boostableSelector)
105
+ {
106
+ var d = new FluentDictionary<string, double?>();
107
+ boostableSelector(d);
108
+ var fieldNames = d
109
+ .Select(o => "{0}^{1}".F(o.Key, o.Value.GetValueOrDefault(1.0).ToString(CultureInfo.InvariantCulture)));
110
+ return this.OnFields(fieldNames);
111
+ }
112
113
public QueryStringDescriptor<T> Query(string query)
114
{
0 commit comments