# Stop filter problem: enablePositionIncrements=false is not supported anymore as of Lucene 4.4 as it can create broken token streams

**URL:** <https://discuss.elastic.co/t/stop-filter-problem-enablepositionincrements-false-is-not-supported-anymore-as-of-lucene-4-4-as-it-can-create-broken-token-streams/13457>\
**Category:** Elasticsearch\
**Created:** [September 4, 2013, 12:07pm UTC](https://discuss.elastic.co/t/stop-filter-problem-enablepositionincrements-false-is-not-supported-anymore-as-of-lucene-4-4-as-it-can-create-broken-token-streams/13457 "2013-09-04T12:07:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![rmuir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmuir/32/44949_2.png) [@rmuir](https://discuss.elastic.co/u/rmuir)\
**Post date:** [December 19, 2013, 5:04am UTC](https://discuss.elastic.co/t/stop-filter-problem-enablepositionincrements-false-is-not-supported-anymore-as-of-lucene-4-4-as-it-can-create-broken-token-streams/13457/5 "2013-12-19T05:04:07Z")

</div>

the old disabling of position increments was bogus.  
for example a stop filter could remove a token and "move" a synonym  
from one word to another.

so this option conflated two unrelated things: whether or not a "gap"  
should be introduced when a word is removed, and whether any existing  
positions (e.g. from synonyms) should be respected.

in my opinion (but i have not thought it over in a while, look at the  
issue age) its possible to prevent the introduction of gaps while  
still respecting existing ones:  
[https://issues.apache.org/jira/browse/LUCENE-4065](https://issues.apache.org/jira/browse/LUCENE-4065)

On Wed, Dec 18, 2013 at 11:54 PM, Michael Cheremuhin [micherr@gmail.com](mailto:micherr@gmail.com) wrote:

> Hi Jondow,
> 
> Is there any progress on the issue?
> 
> среда, 4 сентября 2013 г., 17:16:47 UTC+3 пользователь Jondow написал:
> 
> > Hi Jörg,
> > 
> > The problem is that the default is set to true, and with it set to true,  
> > my shingle filter results include underscores because of the stop filter in  
> > use, which I don't want. Traditionally the way to get rid of this was to set  
> > enablePositionIncrements to false in the stop filter. This is no longer  
> > possible, hence my predicament. ☹
> > 
> > On Wednesday, 4 September 2013 14:49:44 UTC+2, Jörg Prante wrote:
> > 
> > > Drop enable\_position\_increments parameter or set it to true.
> > > 
> > > In shingle filters, you should set min\_shingle\_size to 2.
> > > 
> > > Jörg
> 
> --  
> 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/30411acd-1a9d-4332-a3bf-13e7249d91a8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30411acd-1a9d-4332-a3bf-13e7249d91a8%40googlegroups.com).
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAOdYfZVVDM6MjjS5E%2Bx68B8PXOkBRsjeZuRE8831frcS6CR7Fw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOdYfZVVDM6MjjS5E%2Bx68B8PXOkBRsjeZuRE8831frcS6CR7Fw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

_[View the full topic](https://discuss.elastic.co/t/stop-filter-problem-enablepositionincrements-false-is-not-supported-anymore-as-of-lucene-4-4-as-it-can-create-broken-token-streams/13457)._
