# Preserve\_position\_increments mapping flag of suggester not working

**URL:** <https://discuss.elastic.co/t/preserve-position-increments-mapping-flag-of-suggester-not-working/22062>\
**Category:** Elasticsearch\
**Created:** [February 10, 2015, 12:42pm UTC](https://discuss.elastic.co/t/preserve-position-increments-mapping-flag-of-suggester-not-working/22062 "2015-02-10T12:42:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pete\_Neiberg](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Pete\_Neiberg](https://discuss.elastic.co/u/Pete_Neiberg)\
**Post date:** [February 10, 2015, 12:42pm UTC](https://discuss.elastic.co/t/preserve-position-increments-mapping-flag-of-suggester-not-working/22062/1 "2015-02-10T12:42:27Z")

</div>

Hi all,

my suggestion mapping and my suggestion call is working in principle,  
except the behaviour that should be enabled by the  
preserve\_position\_increments: false flag.

Excerpt of the ES reference:  
"preserve\_position\_increments Enables position increments, defaults to true.  
If disabled and using stopwords analyzer, you could get a field starting  
with The Beatles, if you suggest for b. _Note_: You could also achieve this  
by indexing two inputs, Beatles and The Beatles, no need to change a simple  
analyzer, if you are able to enrich your data."

my mapping:

```
                    "suggest": {
                         "type": "completion",
                        "index_analyzer": "standard",
                        "search_analyzer": "standard",
                        "payloads": true,
                        "preserve_separators": false,
                        "preserve_position_increments": false,
                        "max_input_length": 250
                    }

```

that is my call:

POST [http://localhost:9200/](http://localhost:9200/)/\_suggest {  
"test-suggest" : {  
"text" : "Adlon",  
"completion" : {  
"field" : "persons.3.perLanguage.deu.suggest"  
}  
}  
}

the value of the field above is: Percy Adlon

it is working for the Text Percy, Per or PercyA

Any ideas what I am doing wrong? (ES version 1.3.2)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a28bff22-3cb4-4f93-bdb6-fad3aca70280%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a28bff22-3cb4-4f93-bdb6-fad3aca70280%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:33am UTC](https://discuss.elastic.co/t/preserve-position-increments-mapping-flag-of-suggester-not-working/22062/2 "2017-07-06T00:33:56Z")

</div>


