You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a query that returns some term aggregations, but when adding the terms where the key is a number, the key will be null on the Nest.KeyItem and the DocCount zero. The aggregations with text keys work just fine. If I run the same query in sense, the values look as expected. My guess is it happens during deserialization, but I wasn't able to find the correct spot. Attached is 2 images showing the data.
The text was updated successfully, but these errors were encountered:
I think just checking if reader.ValueType == typeof(string) and reader.Value == keyItem.key, then skipping over the key_as_string property should work.
Actually, checking reader.Path.Contains("key_as_string") will probably work better.
I was however, able to reproduce the 0 DocCount. @jekstrom is correct, this was due to the fact that the response for term aggs changed in 1.2 and now includes a "key_as_string" property, which can be skipped. I just pushed the above fix- great catch, thank you!
I have a query that returns some term aggregations, but when adding the terms where the key is a number, the key will be null on the Nest.KeyItem and the DocCount zero. The aggregations with text keys work just fine. If I run the same query in sense, the values look as expected. My guess is it happens during deserialization, but I wasn't able to find the correct spot. Attached is 2 images showing the data.
The text was updated successfully, but these errors were encountered: