From e741c405493ecb5104b13e5d4774f20dddbd7bf4 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Tue, 25 Jul 2006 06:39:37 +0000 Subject: [PATCH] [MRM-127] notes git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@425307 13f79535-47bb-0310-9956-ffa450edef68 --- maven-repository-indexer/pom.xml | 3 ++- .../repository/indexing/DefaultRepositoryIndexSearchLayer.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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(); )