From 2078b86ba72bc086d7f8890e165e33b19d0efcb4 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 14 May 2014 07:44:05 +0000 Subject: [PATCH] LUCENE-5666: clear nocommits and fix precommit git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5666@1594505 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 12 +++++++++ .../TestCollationDocValuesField.java | 2 +- lucene/core/build.xml | 1 - .../grouping/BlockGroupingCollector.java | 2 +- .../lucene/search/grouping/package.html | 3 +-- .../term/TermFirstPassGroupingCollector.java | 2 +- .../lucene/search/grouping/term/package.html | 2 +- lucene/misc/build.xml | 4 +++ .../lucene/uninverting/UninvertingReader.java | 14 +++++++++++ .../solr/search/SolrFieldCacheMBean.java | 25 +++---------------- .../search/function/TestFunctionQuery.java | 4 --- 11 files changed, 38 insertions(+), 33 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 9558534ee33..d5f0e42d32f 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -65,6 +65,18 @@ API Changes as tokens anymore, and now iterates cells on-demand during indexing instead of building a collection. RPT now has more setters. (David Smiley) +* LUCENE-5666: Change uninverted access (sorting, faceting, grouping, etc) + to use the DocValues API instead of FieldCache. For FieldCache functionality, + use UninvertingReader in lucene/misc (or implement your own FilterReader). + UninvertingReader is more efficient: supports multi-valued numeric fields, + detects when a multi-valued field is single-valued, reuses caches + of compatible types (e.g. SORTED also supports BINARY and SORTED_SET access + without insanity). "Insanity" is no longer possible unless you explicitly want it. + Rename FieldCache* and DocTermOrds* classes in the search package to DocValues*. + Move SortedSetSortField to core and add SortedSetFieldSource to queries/, which + takes the same selectors. Add helper methods to DocValues.java that are better + suited for search code (never return null, etc). (Mike McCandless, Robert Muir) + Documentation * LUCENE-5392: Add/improve analysis package documentation to reflect diff --git a/lucene/analysis/common/src/test/org/apache/lucene/collation/TestCollationDocValuesField.java b/lucene/analysis/common/src/test/org/apache/lucene/collation/TestCollationDocValuesField.java index 2e4a24276de..054f64b6c94 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/collation/TestCollationDocValuesField.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/collation/TestCollationDocValuesField.java @@ -85,7 +85,7 @@ public class TestCollationDocValuesField extends LuceneTestCase { RandomIndexWriter iw = new RandomIndexWriter(random(), dir); Document doc = new Document(); Field field = newField("field", "", StringField.TYPE_STORED); - Collator collator = Collator.getInstance(); // uses -Dtests.locale + Collator collator = Collator.getInstance(Locale.getDefault()); // uses -Dtests.locale if (random().nextBoolean()) { collator.setStrength(Collator.PRIMARY); } diff --git a/lucene/core/build.xml b/lucene/core/build.xml index 8b7d018fff6..7d80c70662c 100644 --- a/lucene/core/build.xml +++ b/lucene/core/build.xml @@ -31,7 +31,6 @@ "/> diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java index 7c33583292f..f40c2a756b8 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/BlockGroupingCollector.java @@ -300,7 +300,7 @@ public class BlockGroupingCollector extends SimpleCollector { * This is normally not a problem, as you can obtain the * value just like you obtain other values for each * matching document (eg, via stored fields, via - * FieldCache, etc.) + * DocValues, etc.) * * @param withinGroupSort The {@link Sort} used to sort * documents within each group. Passing null is diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/package.html b/lucene/grouping/src/java/org/apache/lucene/search/grouping/package.html index e45b66692be..c346c717c7d 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/package.html +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/package.html @@ -80,8 +80,7 @@ field fall into a single group.

Known limitations: