How can I query for keys that has this syntax: "bbkd:title"


(Kara) #1

I got the following successfully indexed in Elasticsearch but the
query fails. Any idea how I can query for the value of "owner that is
mongo"

curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{
"bbkd:title": {
"@ABCD:owner": "mongo",
"@ABCD:email": "T",
"#text": "Test"
}}'

Thanks!
Kara


(Shay Banon) #2

Here is a sample of how you can query it: https://gist.github.com/1992548. Using the text query. Note, it will be much simpler for you to query data (especially when using the query_string) if you don't have : in the field names.

On Tuesday, March 6, 2012 at 9:09 PM, Kara wrote:

I got the following successfully indexed in Elasticsearch but the
query fails. Any idea how I can query for the value of "owner that is
mongo"

curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{
"bbkd:title": {
"@ABCD:owner": "mongo",
"@ABCD:email": "T",
"#text": "Test"
}}'

Thanks!
Kara


(system) #3