lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Semb Wever (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1380) Patch for ShingleFilter.enablePositions
Date Sat, 13 Sep 2008 12:38:44 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630762#action_12630762
] 

Michael Semb Wever commented on LUCENE-1380:
--------------------------------------------

> One could argue that what you should do rather than using this patch is to add a TokenFilter
that sets all positionIncrement to 0. 

Really? You'll have to excuse me - i am very new to Lucene.
How would i go about that? Such a TokenFilter exists already?

> Setting this to false will instead create a PhraseQuery.

This isn't correct. PhraseQuery is used when every token has a non-zero positionIncrement,
ie when severalTokensAtSamePosition == false.
What does happen is that the MultiPhraseQuery that is constructed is limited to one-dimension.


> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message