Word_delimiter_graph + preserve_original = token position matters for "match" query

following issue:

DELETE test

PUT test
{
  "settings": {
    "number_of_shards": "1",
    "number_of_replicas": "0",
    "analysis": {
      "filter": {
        "word_delimiter_filter": {
          "type": "word_delimiter_graph",
          "preserve_original": true
        }},
      "analyzer": {
        "wordpart_analyzer": {
          "filter": [
            "word_delimiter_filter"
          ],
          "tokenizer": "keyword"
        }}}},
  "mappings": {
    "properties": {
      "title": {
        "type": "text",
            "analyzer": "wordpart_analyzer"
            //,"index_options": "freqs"
        }}}}


PUT test/_bulk
{"index":{}}
{"title":"termA termB termC termD"}

GET test/_search
{
  "query": {
    "match": {
      "title": {
        "query": "termA termB termD"
      }}}}

the search does not return the document.
Workaround: uncomment the "index_options": "freqs"

Is it expected behavior?
Thanks!

any hints on that?..

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.