You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by yo...@apache.org on 2006/02/06 17:24:24 UTC
svn commit: r375308 - in /incubator/solr/trunk: build.xml
src/java/org/apache/solr/search/SolrIndexSearcher.java src/lucene_extras/
Author: yonik
Date: Mon Feb 6 08:24:21 2006
New Revision: 375308
URL: http://svn.apache.org/viewcvs?rev=375308&view=rev
Log:
remove lucene package and lucene_extras dir, FieldSortedHitQueue is now public in lucene.
Removed:
incubator/solr/trunk/src/lucene_extras/
Modified:
incubator/solr/trunk/build.xml
incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java
Modified: incubator/solr/trunk/build.xml
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/build.xml?rev=375308&r1=375307&r2=375308&view=diff
==============================================================================
--- incubator/solr/trunk/build.xml (original)
+++ incubator/solr/trunk/build.xml Mon Feb 6 08:24:21 2006
@@ -43,10 +43,7 @@
<!-- The compilation classpath -->
<path id="compile.classpath">
<fileset dir="${lib}">
- <include name="lucene-core-nightly.jar" />
- <include name="lucene-snowball-nightly.jar" />
- <include name="servlet-api-2.4.jar" />
- <include name="xpp3-1.1.3.4.O.jar" />
+ <include name="*.jar" />
</fileset>
</path>
@@ -60,14 +57,6 @@
<src path="${src}/java" />
<src path="${src}/webapp" />
- <!-- This dir includes tests, but is needed by core: need to split these up -->
- <!-- A better name for this directory is needed anyways. -->
- <src path="${src}/lucene_extras" >
- </src>
-
- <!-- Only need this for now because lucene_extras has a test class -->
- <exclude name="**/Test*" />
-
</javac>
</target>
@@ -123,7 +112,7 @@
webxml="${src}/webapp/WEB-INF/web.xml">
<classes dir="${dest}" />
<lib dir="${lib}">
- <exclude name="servlet-api-2.4.jar" />
+ <exclude name="servlet-api-*.jar" />
</lib>
@@ -150,7 +139,7 @@
basedir="${dest}" />
<zip destfile="${dist}/${ant.project.name}-${version}.zip"
- basedir="${dist}" />
+ basedir="${dest}" />
</target>
-</project>
\ No newline at end of file
+</project>
Modified: incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java?rev=375308&r1=375307&r2=375308&view=diff
==============================================================================
--- incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java (original)
+++ incubator/solr/trunk/src/java/org/apache/solr/search/SolrIndexSearcher.java Mon Feb 6 08:24:21 2006
@@ -696,17 +696,19 @@
// NOTE: this changed late in Lucene 1.9
final DocSet filt = filter;
- final PublicFieldSortedHitQueue hq = new PublicFieldSortedHitQueue(reader, lsort.getSort(), offset+len);
+ final int[] numHits = new int[1];
+ final FieldSortedHitQueue hq = new FieldSortedHitQueue(reader, lsort.getSort(), offset+len);
searcher.search(query, new HitCollector() {
public void collect(int doc, float score) {
if (filt!=null && !filt.exists(doc)) return;
+ numHits[0]++;
hq.insert(new FieldDoc(doc, score));
}
}
);
- totalHits = hq.getTotalHits();
+ totalHits = numHits[0];
maxScore = totalHits>0 ? hq.getMaxScore() : 0.0f;
nDocsReturned = hq.size();
@@ -916,8 +918,8 @@
protected DocList sortDocSet(DocSet set, Sort sort, int nDocs) throws IOException {
- final PublicFieldSortedHitQueue hq =
- new PublicFieldSortedHitQueue(reader, sort.getSort(), nDocs);
+ final FieldSortedHitQueue hq =
+ new FieldSortedHitQueue(reader, sort.getSort(), nDocs);
DocIterator iter = set.iterator();
int hits=0;
while(iter.hasNext()) {