Hi Clinton,

Thanks for your reply. I tried as suggested and the same is working now :) 
One question though, I have to pass the text field in lower case always as 
the same is getting analyzed by standard analyzer I guess. Is there any way 
to pass multiple match in bool for text search so that I can search with 
part of the exact text entered, like "CLOUD" instead of "cloud" 
 
I tried below as given in link 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html
but it's giving error as 'Duplicate key "match" - syntax error' 

POST /aricloud/_search
{
    "query": {
        "filtered": {
           "query": {
           "bool": {
              "must": [
                 {"term": {
                     "CLOUD_TYPE": {
                      "value": "cloudstack"
                    }
                 }
                  }
              ] ,
              "must_not": [
                 {
                   "term": {
                     "NODE_ID": {
                      "value": "12235"
                    }
                }     
                 }
              ],
              "should": [
                 {
                    "match": {
                       "NODE_HOSTNAME": "cloudserver.aricent.com"
                    },
                    "match": {
                       "NODE_GROUP_NAME": "MYSQL"
                    }
                 }
              ]
           }
           },
           "filter": {
               "range": {
                  "NODE_CREATE_TIME": {
                     "from": "2014-03-14 16:32:35",
                     "to": "2014-03-14 18:43:55"
                  }
               }
           }
        }
    },
    "sort": [
       {
          "NODE_ID": {
             "order": "desc"
          }
       }
    ]
}

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/8aac212b-018c-4f51-8222-9bb00a09377d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to