fixed bug

Former-commit-id: 94c67d4289b5766c3d184cddfc8231efec645764
This commit is contained in:
Jeremy Long
2013-03-08 17:32:16 -05:00
parent 4945446171
commit 55004e7832

View File

@@ -59,7 +59,13 @@ public final class VersionTokenizingFilter extends TokenFilter {
public boolean incrementToken() throws IOException {
if (tokens.size() == 0 && input.incrementToken()) {
String version = new String(termAtt.buffer(), 0, termAtt.length());
analyzeVersion(version);
String[] toAnalyze = version.split("[_-]");
if (toAnalyze.length > 1) { //ensure we analyze the whole string as one too
analyzeVersion(version);
}
for (String str : toAnalyze) {
analyzeVersion(version);
}
}
return addTerm();
}