mikemccand commented on code in PR #12875: URL: https://github.com/apache/lucene/pull/12875#discussion_r1418918221
########## lucene/analysis/common/src/java/org/apache/lucene/analysis/path/PathHierarchyTokenizer.java: ########## @@ -112,11 +115,8 @@ public PathHierarchyTokenizer( public final boolean incrementToken() throws IOException { clearAttributes(); termAtt.append(resultToken); - if (resultToken.length() == 0) { - posAtt.setPositionIncrement(1); - } else { - posAtt.setPositionIncrement(0); - } + posIncAtt.setPositionIncrement(1); + posLenAtt.setPositionLength(1); Review Comment: Note that `1` is already the default for `PositionLengthAttribute` so you could skip pulling/setting it. -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org