From dd10f631bc5301a6a17d16174d35b8809fd21a93 Mon Sep 17 00:00:00 2001 From: James William Dumay Date: Thu, 11 Dec 2008 01:41:47 +0000 Subject: [PATCH] Tokenize versions git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-search-improvements@725526 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/indexer/filecontent/FileContentAnalyzer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/filecontent/FileContentAnalyzer.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/filecontent/FileContentAnalyzer.java index 21518080e..7921022ce 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/filecontent/FileContentAnalyzer.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/filecontent/FileContentAnalyzer.java @@ -27,6 +27,7 @@ import org.apache.maven.archiva.indexer.lucene.analyzers.ArtifactIdTokenizer; import org.apache.maven.archiva.indexer.lucene.analyzers.GroupIdTokenizer; import java.io.Reader; +import org.apache.maven.archiva.indexer.lucene.analyzers.VersionTokenizer; /** * FileContentAnalyzer @@ -54,6 +55,11 @@ public class FileContentAnalyzer extends Analyzer return new GroupIdTokenizer(reader); } + if ( FileContentKeys.VERSION.equals( field )) + { + return new VersionTokenizer(reader); + } + return STANDARD.tokenStream( field, reader ); } } -- 2.39.5