Apache Lucene open-source search software
upgrade to lucene 2.9-dev r804692
Yonik Seeleyb45440d7c78e
diff --git a/CHANGES.txt b/CHANGES.txtindex 7db29ee3b0d..c5db94812d2 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -42,6 +42,11 @@ requests. (The simplest way to do this is by specifying it as a default paramfor your request handlers in solrconfig.xml, see the example solrconfig.xml forsample syntax.)+Versions of Major Components+----------------------------+Apache Lucene 2.9-dev r804692+Apache Tika 0.4+Detailed Change List----------------------@@ -587,6 +592,7 @@ Other Changes45. SOLR1276: Added StatsComponentTest (Rafał Kuć, gsingers)+Build----------------------1. SOLR-776: Added in ability to sign artifacts via Ant for releases (gsingers)diff --git a/lib/lucene-analyzers-2.9-dev.jar b/lib/lucene-analyzers-2.9-dev.jarindex ecc7e40023f..3984ffc0dd1 100644--- a/lib/lucene-analyzers-2.9-dev.jar+++ b/lib/lucene-analyzers-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[bed34d9cc9433b6a5153a308b4eb165fd4dfbec4] was removed in git history.+AnyObjectId[d4c4cf3acebb4c0b72fd952879fd5c38ce3230bb] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-core-2.9-dev.jar b/lib/lucene-core-2.9-dev.jarindex 13938c6f705..987c12a8c05 100644--- a/lib/lucene-core-2.9-dev.jar+++ b/lib/lucene-core-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[2c09a22e4fd3c278ab827a66ba6c2783cd33b5aa] was removed in git history.+AnyObjectId[ac33f33c980e56986079ea4f154d44b4a78bbc77] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-highlighter-2.9-dev.jar b/lib/lucene-highlighter-2.9-dev.jarindex 8daf19092db..abdee849dda 100644--- a/lib/lucene-highlighter-2.9-dev.jar+++ b/lib/lucene-highlighter-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[070f98d8b8f1734cea153a32d191fd0810a64165] was removed in git history.+AnyObjectId[508cc5abbb95805c4e73fa1e0b7a5b0792be4ad2] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-memory-2.9-dev.jar b/lib/lucene-memory-2.9-dev.jarindex fa510a5f13f..1b6db01c672 100644--- a/lib/lucene-memory-2.9-dev.jar+++ b/lib/lucene-memory-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[ee9ef071b5dcaaec074131120f78c08865d638b6] was removed in git history.+AnyObjectId[e9673d750fd4025b7f71b951d8873b0b27e79519] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-misc-2.9-dev.jar b/lib/lucene-misc-2.9-dev.jarindex 6746ada516c..25e54cbe47a 100644--- a/lib/lucene-misc-2.9-dev.jar+++ b/lib/lucene-misc-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[b955549403c836db189f3a7af0322751d5fadda8] was removed in git history.+AnyObjectId[072ad90bc0b469489025b365f6590cc476485fe0] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-queries-2.9-dev.jar b/lib/lucene-queries-2.9-dev.jarindex 2e7be6174de..c6afd9d982a 100644--- a/lib/lucene-queries-2.9-dev.jar+++ b/lib/lucene-queries-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[de31833e9d2bd31c40bc60fab1478699a9db771d] was removed in git history.+AnyObjectId[0b353782c684f8450ab7201a8bc5154581808785] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-snowball-2.9-dev.jar b/lib/lucene-snowball-2.9-dev.jarindex 0976a824028..3b1e8062b55 100644--- a/lib/lucene-snowball-2.9-dev.jar+++ b/lib/lucene-snowball-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[72f0d5c49c3bdb0371df2d34a558751b0ea564b4] was removed in git history.+AnyObjectId[4994e36713780cc6af82551069dd1fb6be708616] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/lib/lucene-spellchecker-2.9-dev.jar b/lib/lucene-spellchecker-2.9-dev.jarindex 7ca82e4752e..c5f13759292 100644--- a/lib/lucene-spellchecker-2.9-dev.jar+++ b/lib/lucene-spellchecker-2.9-dev.jar@@ -1,2 +1,2 @@-AnyObjectId[f23c609ef48c657d6c96490292fd7d6b5752af80] was removed in git history.+AnyObjectId[689836c2a91f1484e617430df25055360c52c173] was removed in git history.Apache SVN contains full history.\ No newline at end of filediff --git a/src/java/org/apache/solr/search/function/BoostedQuery.java b/src/java/org/apache/solr/search/function/BoostedQuery.javaindex 67328ab9139..8ce0c4f5f0f 100755--- a/src/java/org/apache/solr/search/function/BoostedQuery.java+++ b/src/java/org/apache/solr/search/function/BoostedQuery.java@@ -56,7 +56,7 @@ public class BoostedQuery extends Query {return new BoostedQuery.BoostedWeight(searcher);}- private class BoostedWeight implements Weight {+ private class BoostedWeight extends Weight {Searcher searcher;Weight qWeight;@@ -84,19 +84,19 @@ public class BoostedQuery extends Query {qWeight.normalize(norm);}- public Scorer scorer(IndexReader reader) throws IOException {- Scorer subQueryScorer = qWeight.scorer(reader);- return new BoostedQuery.CustomScorer(getSimilarity(searcher), reader, this, subQueryScorer, boostVal);+ public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {+ Scorer subQueryScorer = qWeight.scorer(reader, true, false);+ return new BoostedQuery.CustomScorer(getSimilarity(searcher), searcher, reader, this, subQueryScorer, boostVal);}- public Explanation explain(IndexReader reader, int doc) throws IOException {+ public Explanation explain(Searcher searcher, IndexReader reader, int doc) throws IOException {SolrIndexReader topReader = (SolrIndexReader)reader;SolrIndexReader[] subReaders = topReader.getLeafReaders();int[] offsets = topReader.getLeafOffsets();int readerPos = SolrIndexReader.readerIndex(doc, offsets);int readerBase = offsets[readerPos];- Explanation subQueryExpl = qWeight.explain(reader,doc);+ Explanation subQueryExpl = qWeight.explain(searcher,reader,doc);if (!subQueryExpl.isMatch()) {return subQueryExpl;}@@ -118,14 +118,16 @@ public class BoostedQuery extends Query {private final Scorer scorer;private final DocValues vals;private final IndexReader reader;+ private final Searcher searcher;- private CustomScorer(Similarity similarity, IndexReader reader, BoostedQuery.BoostedWeight w,+ private CustomScorer(Similarity similarity, Searcher searcher, IndexReader reader, BoostedQuery.BoostedWeight w,Scorer scorer, ValueSource vs) throws IOException {super(similarity);this.weight = w;this.qWeight = w.getValue();this.scorer = scorer;this.reader = reader;+ this.searcher = searcher; // for explainthis.vals = vs.getValues(reader);}@@ -155,7 +157,7 @@ public class BoostedQuery extends Query {}public Explanation explain(int doc) throws IOException {- Explanation subQueryExpl = weight.qWeight.explain(reader,doc);+ Explanation subQueryExpl = weight.qWeight.explain(searcher,reader,doc);if (!subQueryExpl.isMatch()) {return subQueryExpl;}diff --git a/src/java/org/apache/solr/search/function/FunctionQuery.java b/src/java/org/apache/solr/search/function/FunctionQuery.javaindex 3e84f9943c4..49638b4a125 100644--- a/src/java/org/apache/solr/search/function/FunctionQuery.java+++ b/src/java/org/apache/solr/search/function/FunctionQuery.java@@ -54,7 +54,7 @@ public class FunctionQuery extends Query {public void extractTerms(Set terms) {}- protected class FunctionWeight implements Weight {+ protected class FunctionWeight extends Weight {protected Searcher searcher;protected float queryNorm;protected float queryWeight;@@ -63,6 +63,7 @@ public class FunctionQuery extends Query {this.searcher = searcher;}+public Query getQuery() {return FunctionQuery.this;}@@ -81,17 +82,17 @@ public class FunctionQuery extends Query {queryWeight *= this.queryNorm;}- public Scorer scorer(IndexReader reader) throws IOException {+ public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {return new AllScorer(getSimilarity(searcher), reader, this);}- public Explanation explain(IndexReader reader, int doc) throws IOException {+ public Explanation explain(Searcher searcher, IndexReader reader, int doc) throws IOException {SolrIndexReader topReader = (SolrIndexReader)reader;SolrIndexReader[] subReaders = topReader.getLeafReaders();int[] offsets = topReader.getLeafOffsets();int readerPos = SolrIndexReader.readerIndex(doc, offsets);int readerBase = offsets[readerPos];- return scorer(subReaders[readerPos]).explain(doc-readerBase);+ return scorer(subReaders[readerPos], true, true).explain(doc-readerBase);}}diff --git a/src/java/org/apache/solr/search/function/QueryValueSource.java b/src/java/org/apache/solr/search/function/QueryValueSource.javaindex 3ad766115ae..6288818e516 100755--- a/src/java/org/apache/solr/search/function/QueryValueSource.java+++ b/src/java/org/apache/solr/search/function/QueryValueSource.java@@ -87,7 +87,7 @@ class QueryDocValues extends DocValues {try {if (doc < lastDocRequested) {// out-of-order access.... reset scorer.- scorer = weight.scorer(reader);+ scorer = weight.scorer(reader, true, false);scorerDoc = scorer.nextDoc();}lastDocRequested = doc;