Using "constant_score" queries in Kibana

Hi,

I'm looking for a way to query ES from Kibana with a "constant_score" query
(see eg.
http://elasticsearch-users.115913.n3.nabble.com/exists-filter-td4047532.html).
The reason is that I have a lot of JSON data in ES in this format (sensor
readings/timestamps):

{"timestamp":"2015-03-23T10:39:35.346Z",
"sensor-1643":42,"sensor-1643_ts":1427107007585,
"sensor-1583":17,"sensor-1583_ts":1427106972603,
"sensor-1581":-1,"sensor-1581_ts":1427106985593,
"sensor-1578":-3,"sensor-1578_ts":1427106986940,
"sensor-1645":0,"sensor-1645_ts":1427107009517,
"sensor-1574":38,"sensor-1574_ts":1427106970044,
"sensor-1635":600,"sensor-1635_ts":1427106996913,
...}

  • and I want to search for the documents that contain readings for a
    specific sensor, eg. "sensor-1643".

With a "constant_score" query, I can query ES directly like this:

{
"constant_score" : {
"filter" : {
"exists" : { "field" : "sensor-1643"}
},
}
}

But is there any way of doing that through Kibana? Searching seems only to
regard value fields...

Thanks,
Ole Hedegaard

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9d2ec524-8850-44a3-8ff4-61b9a75906a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ok, I found out myself. It is possible to use exists like this:

exists:"sensor-1643"

Den mandag den 23. marts 2015 kl. 11.50.05 UTC+1 skrev Ole Hedegaard:

Hi,

I'm looking for a way to query ES from Kibana with a "constant_score"
query (see eg.
http://elasticsearch-users.115913.n3.nabble.com/exists-filter-td4047532.html).
The reason is that I have a lot of JSON data in ES in this format (sensor
readings/timestamps):

{"timestamp":"2015-03-23T10:39:35.346Z",
"sensor-1643":42,"sensor-1643_ts":1427107007585,
"sensor-1583":17,"sensor-1583_ts":1427106972603,
"sensor-1581":-1,"sensor-1581_ts":1427106985593,
"sensor-1578":-3,"sensor-1578_ts":1427106986940,
"sensor-1645":0,"sensor-1645_ts":1427107009517,
"sensor-1574":38,"sensor-1574_ts":1427106970044,
"sensor-1635":600,"sensor-1635_ts":1427106996913,
...}

  • and I want to search for the documents that contain readings for a
    specific sensor, eg. "sensor-1643".

With a "constant_score" query, I can query ES directly like this:

{
"constant_score" : {
"filter" : {
"exists" : { "field" : "sensor-1643"}
},
}
}

But is there any way of doing that through Kibana? Searching seems only to
regard value fields...

Thanks,
Ole Hedegaard

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/074996d8-60f9-4eb6-8ac1-ecfa8f94872a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.