Skip to content

Suppressing query parsing errors in filterjoin query #94

@fabiocorneti

Description

@fabiocorneti

The script below creates two indices and executes a filterjoin having a terms query with an invalid value for the name parameter; is the error in the query suppressed by design?

#!/bin/bash
ES=http://localhost:9200

curl -XDELETE $ES/places
curl -XDELETE $ES/people
curl -XPUT $ES/places
curl -XPUT $ES/people
curl -XPUT $ES/people/_mappings/person -d '{"person": {"properties": {"name": {"type": "string", "index": "not_analyzed"}, "city": {"type": "string", "index": "not_analyzed"}}}}'
curl -XPUT $ES/places/_mappings/city -d '{"city": {"properties": {"name": {"type": "string", "index": "not_analyzed"}}}}'
curl -XPOST $ES/people/person/luke -d '{"name": "Jack Foo", "city": "Rome"}'
curl -XPOST $ES/people/person/anakin -d '{"name": "John Bar", "city": "Prague"}'
curl -XPOST $ES/places/city/Prague -d '{"name": "Prague"}'
curl -XPOST $ES/places/city/Rome -d '{"name": "Rome"}'

# Search for people in Rome using a terms query with an invalid parameter value; response code is 200
curl -v -XPOST $ES/people/person/_coordinate_search?pretty -d '{
  "filter": {
    "filterjoin": {
      "city": {
        "indices": ["places"],
        "types": ["city"],
        "path": "name",
        "query": {
          "terms": {
            "name": "Rome"
          }
        }
      }
    }
  }
}'

# Standalone query fails
curl -XPOST $ES/places/city/_coordinate_search?pretty -d '{
  "query": {
    "terms": {
      "name": "Rome"
    }
  }
}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions