Created
January 16, 2020 13:04
-
-
Save wflanagan/7ebf52bf0693f4462256dab8785c9baa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This should return hits, it doesn't. | |
curl -XGET "http://localhost:9200/mentions_production/_search" -H 'Content-Type: application/json' -d'{ "query": { "term": {"references": "publisher/profile:mumo.beaplumbereducationok.rocks"} }}' | |
## If you do the query adding the aggs, it then errors wtih a fielddata error | |
curl -XGET "http://localhost:9200/mentions_production/_search" -H 'Content-Type: application/json' -d'{ "query": { "term": {"references": "publisher/profile:mumo.beaplumbereducationok.rocks"} }, "aggs": { "friendly_ids": { "terms": { "field": "references" } } }}' | |
## This one retrieves correctly | |
curl -XGET "http://localhost:9200/mentions_production/_search" -H 'Content-Type: application/json' -d'{ "query": { "bool": { "must": { "match": {"references": "publisher/profile:mumo.beaplumbereducationok.rocks"} } } }}' | |
## This one errors when you add the aggs to it | |
curl -XGET "http://localhost:9200/mentions_production/_search" -H 'Content-Type: application/json' -d'{ "query": { "bool": { "must": { "match": {"references": "publisher/profile:mumo.beaplumbereducationok.rocks"} } } }, "aggs": { "friendly_ids": { "terms": { "field": "references" } } }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment