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

Mapping: Allow to configure position_offset_gap for string mapping #1813

Closed
kimchy opened this issue Mar 24, 2012 · 0 comments
Closed

Mapping: Allow to configure position_offset_gap for string mapping #1813

kimchy opened this issue Mar 24, 2012 · 0 comments

Comments

@kimchy
Copy link
Member

kimchy commented Mar 24, 2012

High position_offset_gap allows to prevent phrase queries to cross multi valued field boundaries. For example:

curl -XPUT localhost:9200/test -d '{
    "mappings" : {
        "type" : {
            "properties" : {
                "text" : {
                    "type" : "string", 
                    "position_offset_gap" : 100
                }
            }
        }
    }
}'

curl -XPUT localhost:9200/test/type/1 -d '{
    "text" : ["xxx yyy", "zzz"]
}'

curl localhost:9200/test/type/_search -d '{
    "query" : {
        "text_phrase" : {
            "text" : "yyy zzz"
        }
    }
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant