[
https://issues.apache.org/jira/browse/LUCENE-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Karl Wettin updated LUCENE-1380:
--------------------------------
Attachment: LUCENE-1380.patch
Renamed field to usingPositionIncrement to avoid confusion, and added a bunch
of javadocs compiled from the issue comments:
{code:java}
/**
* If true each original token (unigram) or the first related shingle from it
* will get a [EMAIL PROTECTED]
org.apache.lucene.analysis.Token#getPositionIncrement() positionIncrement} of 1,
* if false all shingle tokens will get a [EMAIL PROTECTED]
org.apache.lucene.analysis.Token#getPositionIncrement() positionIncrement} of 0.
* <p>
* Default value is true.
* <p>
* This attribute is typically set false in conjunction with use of the
QueryParser that
* when set true will create a MultiPhraseQuery where at least one
word/shingle must be
* matched from each word/token, not desired in all situations. Setting this
to false
* will instead create a PhraseQuery.
*
* @param usingPositionIncrement the coterminal token positionIncrement
setting.
*/
public void setUsingPositionIncrement(boolean usingPositionIncrement){
this.usingPositionIncrement = usingPositionIncrement;
}
{code}
Did I get that right?
Steve, are you still -1? I don't see any harm in this patch.
> Patch for ShingleFilter.enablePositions
> ---------------------------------------
>
> Key: LUCENE-1380
> URL: https://issues.apache.org/jira/browse/LUCENE-1380
> Project: Lucene - Java
> Issue Type: Improvement
> Components: contrib/analyzers
> Reporter: Michael Semb Wever
> Assignee: Karl Wettin
> Fix For: 2.4
>
> Attachments: LUCENE-1380.patch, LUCENE-1380.patch
>
>
> Make it possible for *all* words and shingles to be placed at the same
> position.
> Default is to place each shingle at the same position as the unigram (or
> first shingle if outputUnigrams=false). That is, each coterminal token has
> positionIncrement=1 and every other token a positionIncrement=0.
> This leads to a MultiPhraseQuery where at least one word/shingle must be
> matched from each word/token. This is not always desired.
> See http://comments.gmane.org/gmane.comp.jakarta.lucene.user/34746 for
> mailing list thread.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]