[ https://issues.apache.org/jira/browse/LUCENE-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen updated LUCENE-1095: -------------------------------- Attachment: lucene-1095-pos-incr.patch This patch enables increments optionally in QueryParser and StopFilter, as discussed above. The default behavior has not changed, so there should be no back-comp issues. The implementation in StopFilter differs slightly from the "older" reverted code in that it does not assume incoming tokens to have position-increment of 1. So it should work ok when stop filters and "expanders" are concatenated. Added API: {code} QueryParser { public boolean getApplyPositionIncrements(); public void setApplyPositionIncrements(boolean applyPositionIncrements); } {code} And {code} StopFilter { public boolean getApplyPositionIncrements(); public void setApplyPositionIncrements(boolean applyPositionIncrements); public static boolean getDefaultApplyPositionIncrements() public static void setDefaultApplyPositionIncrements(boolean defaultApplyPositionIncrements) } {code} Note the two new static methods in StopFilter - these allow to control behavior system wide, and this way affect the behavior of classes that construct a StopFilter internally, like StopAnalyzer and StandardAnalyzer, without needing to pollute the API of many classes (all Snowball analyzers for instance) with new API. Parse tests and search tests were added. All tests pass. Feedback is required: * Comments on the proposed API: ** the static methods approach? ** perhaps "enable" instead of "apply"? * Do you think this should be added now (it is ready I think) or would you rather to hold this for after 2.3? > StopFilter should have option to incr positionIncrement after stop word > ----------------------------------------------------------------------- > > Key: LUCENE-1095 > URL: https://issues.apache.org/jira/browse/LUCENE-1095 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Hoss Man > Assignee: Doron Cohen > Attachments: lucene-1095-pos-incr.patch > > > I've seen this come up on the mailing list a few times in the last month, so > i'm filing a known bug/improvement arround it... > StopFilter should have an option that if set, records how many stop words are > "skipped" in a row, and then sets that value as the positionIncrement on the > "next" token that StopFilter does return. -- 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]