Filter with not equal to null

Hi

How can i filter data with a condition not equal to null

{
  "from": 0, 
  "size": 10000, 
  "query": {
    "bool": {
      "must_not": [
        { "match" : { "SubjectId" : null}}
      ]
    }
  }
}

giving

{
  "error": {
    "root_cause": [
      {
        "type": "parsing_exception",
        "reason": "No text specified for text query",
        "line": 7,
        "col": 42
      }
    ],
    "type": "parsing_exception",
    "reason": "No text specified for text query",
    "line": 7,
    "col": 42
  },
  "status": 400
}

Thanks
Aneesh L

May be look at the exists query?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.