Hi, I have a document indexed in this format.

"hits": [
         {
            "_index": "temp",
            "_type": "test",
            "_source": {
               "brand": [
                  "A",
                  "B",
                  "C",
                  "D",
                  "E",
                  "F",
                  "G"
               ],
               "search_term": "",
               "age": "19-35 Years",
               "dob": "1981-06-01T00:00:00.000Z",
               "deal": [
                  "P",
                  "Q",
                  "R",
                  "S",
               ]
            }
         }

I want to extract information related to "brand" : "C".I applied a term 
filter on the created alias but It's not giving me the particular 
value,however it gives me all the values (brand : 
"A","B","C","D","E","F","G".Any trick to get "C" and all the values related 
to "C" ? Here is the term filter which I am applying.Not sure,If I have to 
apply a custom CSV analyzer ? 

POST /_aliases
{
    "actions" : [
        {
            "add" : {
                 "index" : "temp",
                 "alias" : "temp_alias",
                "filter" : { 
                      "or" : [
                {
                    "term" : { "brand" : "C" }
                }
            ]
                 }
            }
        }
    ]
}


brand and deal are having this mapping.

"brand": { "type": "string", "index": "not_analyzed" }


Thanks,

Anurag

-- 
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/f62d1ac3-0614-4034-a664-eab868cb1fd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to