Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial fields filtering may return false matches and doesn't allow selecting complete objects #3288

Closed
bleskes opened this Issue Jul 3, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@bleskes
Copy link
Member

bleskes commented Jul 3, 2013

To reproduce:

curl -XPUT "http://localhost:9200/test/type1/1" -d'
{
   "field": "value",
   "array" : [ 1 , 2],
   "obj" : {
       "field": "value"
   }
}'

Then search:

curl -XPOST "http://localhost:9200/test/_search" -d'
{
  "partial_fields": {
     "obj_selection": {
        "include": [ "obj" ]
     },
     "match_problem": {
        "include": [ "field_which_doesnt_exist" ]
     }
  }
}'

Results in:

{
  ...
   "hits": {
      "total": 1,
      "max_score": 1,
      "hits": [
         {
            ...
            "fields": {
               "obj_selection": {}, // not selected.
               "match_problem": {  // should be empty
                  "field": "value"
               }
            }
         }
      ]
   }
}

@ghost ghost assigned bleskes Jul 3, 2013

@bleskes bleskes closed this in 018ca58 Jul 4, 2013

bleskes added a commit that referenced this issue Jul 4, 2013

Filtering maps had false hit is a field was a prefix (but not a match…
…) of an include. Also, exact matching a key whose value is an object resulted in an empty value.

Closes #3288

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Filtering maps had false hit is a field was a prefix (but not a match…
…) of an include. Also, exact matching a key whose value is an object resulted in an empty value.

Closes elastic#3288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.