]> source.dussan.org Git - archiva.git/commitdiff
Tokenize versions
authorJames William Dumay <jdumay@apache.org>
Thu, 11 Dec 2008 01:41:47 +0000 (01:41 +0000)
committerJames William Dumay <jdumay@apache.org>
Thu, 11 Dec 2008 01:41:47 +0000 (01:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-search-improvements@725526 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/maven/archiva/indexer/filecontent/FileContentAnalyzer.java

index 21518080e880445e74632065206bc43a1fcaec6f..7921022cea051fd08ea445bacd9eb5910eaf59e8 100644 (file)
@@ -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 );
     }
 }