Can't query a long number?

(Hoss) #1

I'm using Serilog (C#) with latest version of Elasticsearch and Kibana.

Serilog creates the index. I have a field called RunID that is a long in C# that I specify like so...

serilog.Information("{RunID} - Case {CaseIndex} of {TotalCases} - WCR: {WCR}", runID, testCase.CaseIndex, caseCount, testCase.TestResult.WCR);

If I do a GET myindex in sense, RunID is shown as...

              "RunID": {
                "type": "long"

In Kibana, a Discovery query of * shows the documents and if expand one, the table view shows RunID as 636,035,691,230,479,360 and JSON view shows it as 636035691230479400.

However, query like fields.RunID:636035691230479400 says no results (time is set for 1 year and these are documents logged today).

Other fields that are also long type fields that have smaller values (like 87 for example), work just fine. fields.UtteranceCount:87

Only thing I can see different is the size of the number. RunID values are 18 digits long.

Any help would be greatly appreciated!

(Matt Bargar) #2

The issue might be that Javascript's largest integer is 9007199254740991, but Kibana actually sends the query as a string so I'm not sure. If you open the network tab of your browser devtools you should see an msearch request. Does this request look the way you'd expect? Is ES returning any results? What if you query Elasticsearch directly?

(system) #3