{"action":"created","issue":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9386","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9386/labels{/name}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9386/comments","events_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9386/events","html_url":"https://github.com/elasticsearch/elasticsearch/issues/9386","id":55183133,"number":9386,"title":"Percolator is ignoring position_offset_gap","user":{"login":"prog8","id":6692291,"avatar_url":"https://avatars.githubusercontent.com/u/6692291?v=3","gravatar_id":"","url":"https://api.github.com/users/prog8","html_url":"https://github.com/prog8","followers_url":"https://api.github.com/users/prog8/followers","following_url":"https://api.github.com/users/prog8/following{/other_user}","gists_url":"https://api.github.com/users/prog8/gists{/gist_id}","starred_url":"https://api.github.com/users/prog8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prog8/subscriptions","organizations_url":"https://api.github.com/users/prog8/orgs","repos_url":"https://api.github.com/users/prog8/repos","events_url":"https://api.github.com/users/prog8/events{/privacy}","received_events_url":"https://api.github.com/users/prog8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-22T17:29:03Z","updated_at":"2015-01-22T19:47:50Z","closed_at":null,"body":"I'm testing span queries on percolator and encountered a problem. It seems that percolator is ignoring position_offset_gap. Below there is an example.\r\n\r\n    $ curl \"localhost:9200/test1/_mapping/type?pretty\" -XPUT -d '{\"type\" : {\"properties\" : {\"field1\" : {\"type\" : \"string\", \"position_offset_gap\" : 100}}}}'\r\n    $ curl \"localhost:9200/test1/.percolator\" -d '{\"type\" : \"type\", \"query\" : {\"span_near\" : {\"slop\" : 90, \"clauses\" : [{\"span_term\" : {\"field1\" : \"foo\"}}, {\"span_term\" : {\"field1\":\"bar\"}}]}}}'\r\n    {\"_index\":\"test1\",\"_type\":\".percolator\",\"_id\":\"sK3bC-XYQ9SQ4qC3SpyXfg\",\"_version\":1,\"created\":true}\r\n    $ curl \"localhost:9200/test1/type/_percolate?pretty\" -XGET -d '{\"doc\" : {\"field1\" : [\"foo\", \"bar\"]}}'{\r\n      \"took\" : 3,\r\n      \"_shards\" : {\r\n        \"total\" : 5,\r\n        \"successful\" : 5,\r\n        \"failed\" : 0\r\n      },\r\n      \"total\" : 1,\r\n      \"matches\" : [ {\r\n        \"_index\" : \"test1\",\r\n        \"_id\" : \"sK3bC-XYQ9SQ4qC3SpyXfg\"\r\n      } ]\r\n    }\r\n\r\nTo verify the mapping I also run queries on ES index\r\n\r\n    $ curl \"localhost:9200/test1/type\" -d '{\"field1\" : [\"foo\", \"bar\"]}'\r\n    {\"_index\":\"test1\",\"_type\":\"type\",\"_id\":\"HPMTUjVtS0utxr2USt6UGA\",\"_version\":1,\"created\":true}\r\n    $     curl \"localhost:9200/test1/type/_search?pretty\" -d '{\"query\" : {\"span_near\" : {\"slop\" : 90, \"clauses\" : [{\"span_term\" : {\"field1\" : \"foo\"}}, {\"span_term\" : {\"field1\":\"bar\"}}]}}}'\r\n    {\r\n      \"took\" : 6,\r\n      \"timed_out\" : false,\r\n      \"_shards\" : {\r\n        \"total\" : 5,\r\n        \"successful\" : 5,\r\n        \"failed\" : 0\r\n      },\r\n      \"hits\" : {\r\n        \"total\" : 0,\r\n        \"max_score\" : null,\r\n        \"hits\" : [ ]\r\n      }\r\n    }\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/71085743","html_url":"https://github.com/elasticsearch/elasticsearch/issues/9386#issuecomment-71085743","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/9386","id":71085743,"user":{"login":"prog8","id":6692291,"avatar_url":"https://avatars.githubusercontent.com/u/6692291?v=3","gravatar_id":"","url":"https://api.github.com/users/prog8","html_url":"https://github.com/prog8","followers_url":"https://api.github.com/users/prog8/followers","following_url":"https://api.github.com/users/prog8/following{/other_user}","gists_url":"https://api.github.com/users/prog8/gists{/gist_id}","starred_url":"https://api.github.com/users/prog8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prog8/subscriptions","organizations_url":"https://api.github.com/users/prog8/orgs","repos_url":"https://api.github.com/users/prog8/repos","events_url":"https://api.github.com/users/prog8/events{/privacy}","received_events_url":"https://api.github.com/users/prog8/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T19:47:50Z","updated_at":"2015-01-22T19:47:50Z","body":"This resolves the problem\r\nhttps://github.com/elasticsearch/elasticsearch/pull/9387"}}