uschindler commented on pull request #1966:
URL: https://github.com/apache/lucene-solr/pull/1966#issuecomment-705753920
This would be your filter, plain simple, correct positions, no fillter
tokens needed. All bug-specific tests are obsolete, as this type of Filter is
tested to hell (we have many token-dropping filters):
```java
public final class DropIfFlaggedFilter extends FilteringTokenFilter {
private final FlagsAttribute flagsAtt = addAttribute(FlagsAttribute.class);
private final int dropFlags;
public DropIfFlaggedFilter (TokenStream in, int dropFlags) {
super(in);
this.dropFlags = dropFlags;
}
@Override
public boolean accept() {
return (flagsAtt.getFlags() & dropFlags) != dropFlags; // TODO maybe ==
0 if all or any flag is enough
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]