diff --git a/maven-repository-indexer/pom.xml b/maven-repository-indexer/pom.xml index 4953d3243..859a26bed 100644 --- a/maven-repository-indexer/pom.xml +++ b/maven-repository-indexer/pom.xml @@ -15,7 +15,7 @@ --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> org.apache.maven.repository maven-repository-manager @@ -37,6 +37,7 @@ org.apache.maven maven-model + lucene lucene diff --git a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexSearchLayer.java b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexSearchLayer.java index 068015e08..bd0eac447 100644 --- a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexSearchLayer.java +++ b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/DefaultRepositoryIndexSearchLayer.java @@ -63,6 +63,8 @@ public class DefaultRepositoryIndexSearchLayer for ( int i = 0; i < RepositoryIndex.FIELDS.length; i++ ) { // TODO! does simply iterating the fields and searching each perform well enough and yield correct rankings? + // look into: http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-300f0756fdaa71f522c96a868351f716573f2d77 + // ie: http://lucene.apache.org/java/docs/api/org/apache/lucene/queryParser/MultiFieldQueryParser.html QueryTerm term = new QueryTerm( RepositoryIndex.FIELDS[i], keyword ); List results = searchAdvanced( new SingleTermQuery( term ), index ); for ( Iterator iter = results.iterator(); iter.hasNext(); )