Reputation: 441
I am searching via Webbrowser Firefox with the following URI:
http://localhost:9200/xyz-leads/lead/_search?q=datetimeHour:22_09_2015__12&&deliveryType:EMAIL
But I only get hits with deliveryType:RVS, not EMAIL.
If I search for deliveryType:RVS I get 3 hits.
I know there are 3 results for RVS and 0 for EMAIL with the datetimeHour above, in total.
I guess the standard behaviour of ElasticSearch is, that it ignores the second search value 'deliveryType' and uses only the first 'datetimeHour' if there are no results for both.
If I search for deliveryType:Email, then I want no hits in the response.
Do I need to set some additional ElasticSearch parameters?
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html
_source: {
country: "DEU",
brand: "A",
leadGroup: "TEST",
leadID: 108798,
deliveryType: "RVS",
datetime: 1442916913000,
datetimeFormatted: "22.09.2015 12:15:13",
datetimeHour: "22_09_2015__12",
datetimeDay: "22_09_2015"
}
Upvotes: 0
Views: 190
Reputation: 217554
The query string query you stuff into your URL (i.e. in the q=...
parameter) needs to be well-formed according to the query string query syntax
Try this instead (i.e. using AND
instead of &&
)
http://localhost:9200/xyz-leads/lead/_search?q=datetimeHour:22_09_2015__12%20AND%20deliveryType:EMAIL
Upvotes: 2