Hi All,
  I am working on nested filter query.But this query is searching only on 
nested object properties of type int ,double,date.But not searching when 
the properties of string type.
My document structure is given below-

"sectionResults": [
       {
           "SectionName": "Project Details",
           "itemResults": [
               {
                   "InspectionItem": "Project Id",

                   "Value": "asd",
                   "NumericValue": 0,
                   "DoubleValue": 1,
                   "LongValue": 0,
                   "DateValue": "2014-10-08T00:00:00"
               }

            ]

       }

]



and my query is -


{

  "query": {

    "filtered": {

      "query": {

        "match_all": {}

      },

      "filter": {

        "nested": {

          "path": "sectionResults.itemResults",

          "filter": {

            "bool": {

              "must": [ 

                {

                  "range": {

                    "sectionResults.itemResults.DateValue": {

                      "from": "2014-10-01",

                      "to": "2014-10-08"

                    }

                  }

                },

                {

                  "term": {

                    "sectionResults.itemResults.InspectionItem": "Project Id"

                  }

                }

              ]

            }

          },

          "_cache": true

        }

        }

      }

    }

  } 


For Example - If i do search on InspectionItem Property of itemResults.then 
result found is 0.But gives reults in case of DateValue,DoubleValue properties 
of object itemResults .Please help.

Thanks in advance,







-- 
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/8688c1c4-8111-41e2-af4d-ad2e47295ad6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to