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

MatchPhrasePrefix does not work with fields boosted in the index mapping #21613

Closed
jimczi opened this issue Nov 17, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@jimczi
Copy link
Member

commented Nov 17, 2016

When a field defines a boost directly in the mapping:

PUT t
{
   "mappings": {
      "t": {
         "properties": {
            "textfield": {
               "type": "text", 
               "boost": 3
            }
         }
      }
   }
}

... the match_phrase_prefix query does not consider the last term as prefix:

POST t/t
{
    "textfield" : "foo bar"
}

GET t/t/_search
{
    "query" : {
        "match_phrase_prefix": {
           "textfield": "f"
        }
    }
}

The above query does not return the hit.

@jimczi jimczi self-assigned this Nov 17, 2016

jimczi added a commit that referenced this issue Nov 17, 2016

Fix match_phrase_prefix on boosted fields (#21623)
This change fixes the match_phrase_prefix on fields that define a boost in their mapping.

Fixes #21613

jimczi added a commit that referenced this issue Nov 17, 2016

Fix match_phrase_prefix on boosted fields (#21623)
This change fixes the match_phrase_prefix on fields that define a boost in their mapping.

Fixes #21613
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.