You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2016/06/14 17:40:56 UTC
[1/3] lucene-solr:branch_5x: SOLR-9034: fix atomic updates for
copyField w/ docValues
Repository: lucene-solr
Updated Branches:
refs/heads/branch_5_5 bd3aa4590 -> 6f06e56c7
refs/heads/branch_5x 312429e80 -> 5f91aa95a
SOLR-9034: fix atomic updates for copyField w/ docValues
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5f91aa95
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5f91aa95
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5f91aa95
Branch: refs/heads/branch_5x
Commit: 5f91aa95af35a44d630393a79afbcf8b1f8d0cc4
Parents: 312429e
Author: yonik <yo...@apache.org>
Authored: Thu Apr 28 15:52:17 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 14 13:11:52 2016 -0400
----------------------------------------------------------------------
.../handler/component/RealTimeGetComponent.java | 2 +-
.../apache/solr/search/SolrIndexSearcher.java | 16 +++++++
.../test-files/solr/collection1/conf/schema.xml | 34 +++++++++------
.../update/processor/AtomicUpdatesTest.java | 44 ++++++++++++++++++++
4 files changed, 83 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5f91aa95/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
index c49c87a..b30c786 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
@@ -282,7 +282,7 @@ public class RealTimeGetComponent extends SearchComponent
if (docid < 0) return null;
Document luceneDocument = searcher.doc(docid);
sid = toSolrInputDocument(luceneDocument, core.getLatestSchema());
- searcher.decorateDocValueFields(sid, docid, searcher.getNonStoredDVs(false));
+ searcher.decorateDocValueFields(sid, docid, searcher.getNonStoredDVsWithoutCopyTargets());
}
} finally {
if (searcherHolder != null) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5f91aa95/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
index 084117b..3f473d3 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
@@ -146,6 +146,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
*/
private final Set<String> nonStoredDVsUsedAsStored;
+ /** Contains the names/patterns of all docValues=true,stored=false fields, excluding those that are copyField targets in the schema. */
+ private final Set<String> nonStoredDVsWithoutCopyTargets;
+
private Collection<String> storedHighlightFieldNames;
private DirectoryFactory directoryFactory;
@@ -320,6 +323,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
fieldNames = new HashSet<>();
Set<String> nonStoredDVsUsedAsStored = new HashSet<>();
Set<String> allNonStoredDVs = new HashSet<>();
+ Set<String> nonStoredDVsWithoutCopyTargets = new HashSet<>();
+
fieldInfos = leafReader.getFieldInfos();
for(FieldInfo fieldInfo : fieldInfos) {
fieldNames.add(fieldInfo.name);
@@ -329,11 +334,15 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
nonStoredDVsUsedAsStored.add(fieldInfo.name);
}
allNonStoredDVs.add(fieldInfo.name);
+ if (!schema.isCopyFieldTarget(schemaField)) {
+ nonStoredDVsWithoutCopyTargets.add(fieldInfo.name);
+ }
}
}
this.nonStoredDVsUsedAsStored = Collections.unmodifiableSet(nonStoredDVsUsedAsStored);
this.allNonStoredDVs = Collections.unmodifiableSet(allNonStoredDVs);
+ this.nonStoredDVsWithoutCopyTargets = Collections.unmodifiableSet(nonStoredDVsWithoutCopyTargets);
// We already have our own filter cache
setQueryCache(null);
@@ -896,6 +905,13 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
return onlyUseDocValuesAsStored ? nonStoredDVsUsedAsStored : allNonStoredDVs;
}
+ /**
+ * Returns an unmodifiable set of names of non-stored docValues fields, except those that are targets of a copy field.
+ */
+ public Set<String> getNonStoredDVsWithoutCopyTargets() {
+ return nonStoredDVsWithoutCopyTargets;
+ }
+
/* ********************** end document retrieval *************************/
////////////////////////////////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5f91aa95/solr/core/src/test-files/solr/collection1/conf/schema.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema.xml b/solr/core/src/test-files/solr/collection1/conf/schema.xml
index 41626fb..cfb1789 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema.xml
@@ -646,20 +646,30 @@
<dynamicField name="*_sev_enum" type="severityType" indexed="true" stored="true" docValues="true" multiValued="true" />
<!-- With DocValues=true -->
- <dynamicField name="*_i_dv" type="int" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_l_dv" type="long" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_f_dv" type="float" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_d_dv" type="double" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_dt_dv" type="date" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_f1_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false"/>
+ <dynamicField name="*_i_dv" type="int" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_l_dv" type="long" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_f_dv" type="float" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_d_dv" type="double" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_dt_dv" type="date" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_f1_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false" />
<!-- Non-stored, DocValues=true -->
- <dynamicField name="*_i_dvo" multiValued="false" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_d_dvo" multiValued="false" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_s_dvo" multiValued="false" type="string" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_ii_dvo" multiValued="true" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_dd_dvo" multiValued="true" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
-
+ <dynamicField name="*_i_dvo" multiValued="false" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_d_dvo" multiValued="false" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_s_dvo" multiValued="false" type="string" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_ii_dvo" multiValued="true" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_dd_dvo" multiValued="true" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+
+ <!-- Non-stored, DocValues=true, useDocValuesAsStored=false -->
+ <field name="single_i_dvn" multiValued="false" type="int" indexed="true" stored="true" />
+ <field name="single_d_dvn" multiValued="false" type="double" indexed="true" stored="true" />
+ <field name="single_s_dvn" multiValued="false" type="string" indexed="true" stored="true" />
+ <field name="copy_single_i_dvn" multiValued="false" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
+ <field name="copy_single_d_dvn" multiValued="false" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
+ <field name="copy_single_s_dvn" multiValued="false" type="string" docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
+ <copyField source="single_i_dvn" dest="copy_single_i_dvn" />
+ <copyField source="single_d_dvn" dest="copy_single_d_dvn" />
+ <copyField source="single_s_dvn" dest="copy_single_s_dvn" />
</fields>
<defaultSearchField>text</defaultSearchField>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5f91aa95/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
index 09fa721..b67ea7e 100644
--- a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
+++ b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
@@ -43,6 +43,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {
h.update("<delete><query>*:*</query></delete>");
assertU(commit());
}
+
@Test
public void testRemove() throws Exception {
SolrInputDocument doc;
@@ -1065,6 +1066,49 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {
"/response/docs/[0]/multi_ii_dvo/[0]==100",
"/response/docs/[0]/multi_ii_dvo/[1]==" + Integer.MAX_VALUE);
}
+
+ @Test
+ public void testAtomicUpdatesOnNonStoredDocValuesCopyField() throws Exception {
+ assertU(adoc(sdoc("id", 101, "title", "title2", "single_i_dvn", 100)));
+ assertU(adoc(sdoc("id", 102, "title", "title3", "single_d_dvn", 3.14)));
+ assertU(adoc(sdoc("id", 103, "single_s_dvn", "abc", "single_i_dvn", 1)));
+ assertU(commit());
+
+ // Do each one twice... the first time it will be retrieved from the index, and the second time from the transaction log.
+ for (int i=0; i<2; i++) {
+ assertU(adoc(sdoc("id", 101, "title", ImmutableMap.of("set", "newtitle2"),
+ "single_i_dvn", ImmutableMap.of("inc", 1))));
+ assertU(adoc(sdoc("id", 102, "title", ImmutableMap.of("set", "newtitle3"),
+ "single_d_dvn", ImmutableMap.of("inc", 1))));
+ assertU(adoc(sdoc("id", 103, "single_i_dvn", ImmutableMap.of("inc", 1))));
+ }
+ assertU(commit());
+
+ assertJQ(req("q", "id:101"),
+ "/response/docs/[0]/id==101",
+ "/response/docs/[0]/title/[0]=='newtitle2'",
+ "/response/docs/[0]/single_i_dvn==102");
+
+ assertJQ(req("q", "id:102"),
+ 1e-4,
+ "/response/docs/[0]/id==102",
+ "/response/docs/[0]/title/[0]=='newtitle3'",
+ "/response/docs/[0]/single_d_dvn==5.14");
+
+ assertJQ(req("q", "id:103"),
+ "/response/docs/[0]/id==103",
+ "/response/docs/[0]/single_s_dvn=='abc'",
+ "/response/docs/[0]/single_i_dvn==3");
+
+ // test that non stored docvalues was carried forward for a non-docvalue update
+ assertU(adoc(sdoc("id", 103, "single_s_dvn", ImmutableMap.of("set", "abcupdate"),
+ "single_i_dvn", ImmutableMap.of("set", 5))));
+ assertU(commit());
+ assertJQ(req("q", "id:103"),
+ "/response/docs/[0]/id==103",
+ "/response/docs/[0]/single_s_dvn=='abcupdate'",
+ "/response/docs/[0]/single_i_dvn==5");
+ }
@Test
public void testInvalidOperation() {
[2/3] lucene-solr:branch_5_5: SOLR-9034: fix atomic updates for
copyField w/ docValues
Posted by sa...@apache.org.
SOLR-9034: fix atomic updates for copyField w/ docValues
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7777599d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7777599d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7777599d
Branch: refs/heads/branch_5_5
Commit: 7777599d8365be3424c25e7457fa2169eea58f1e
Parents: bd3aa45
Author: yonik <yo...@apache.org>
Authored: Thu Apr 28 15:52:17 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 14 13:12:33 2016 -0400
----------------------------------------------------------------------
.../handler/component/RealTimeGetComponent.java | 2 +-
.../apache/solr/search/SolrIndexSearcher.java | 16 +++++++
.../test-files/solr/collection1/conf/schema.xml | 34 +++++++++------
.../update/processor/AtomicUpdatesTest.java | 44 ++++++++++++++++++++
4 files changed, 83 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7777599d/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
index c49c87a..b30c786 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
@@ -282,7 +282,7 @@ public class RealTimeGetComponent extends SearchComponent
if (docid < 0) return null;
Document luceneDocument = searcher.doc(docid);
sid = toSolrInputDocument(luceneDocument, core.getLatestSchema());
- searcher.decorateDocValueFields(sid, docid, searcher.getNonStoredDVs(false));
+ searcher.decorateDocValueFields(sid, docid, searcher.getNonStoredDVsWithoutCopyTargets());
}
} finally {
if (searcherHolder != null) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7777599d/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
index 529aa33..0bcea03 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
@@ -146,6 +146,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
*/
private final Set<String> nonStoredDVsUsedAsStored;
+ /** Contains the names/patterns of all docValues=true,stored=false fields, excluding those that are copyField targets in the schema. */
+ private final Set<String> nonStoredDVsWithoutCopyTargets;
+
private Collection<String> storedHighlightFieldNames;
private DirectoryFactory directoryFactory;
@@ -302,6 +305,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
fieldNames = new HashSet<>();
Set<String> nonStoredDVsUsedAsStored = new HashSet<>();
Set<String> allNonStoredDVs = new HashSet<>();
+ Set<String> nonStoredDVsWithoutCopyTargets = new HashSet<>();
+
fieldInfos = leafReader.getFieldInfos();
for(FieldInfo fieldInfo : fieldInfos) {
fieldNames.add(fieldInfo.name);
@@ -311,11 +316,15 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
nonStoredDVsUsedAsStored.add(fieldInfo.name);
}
allNonStoredDVs.add(fieldInfo.name);
+ if (!schema.isCopyFieldTarget(schemaField)) {
+ nonStoredDVsWithoutCopyTargets.add(fieldInfo.name);
+ }
}
}
this.nonStoredDVsUsedAsStored = Collections.unmodifiableSet(nonStoredDVsUsedAsStored);
this.allNonStoredDVs = Collections.unmodifiableSet(allNonStoredDVs);
+ this.nonStoredDVsWithoutCopyTargets = Collections.unmodifiableSet(nonStoredDVsWithoutCopyTargets);
// We already have our own filter cache
setQueryCache(null);
@@ -878,6 +887,13 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
return onlyUseDocValuesAsStored ? nonStoredDVsUsedAsStored : allNonStoredDVs;
}
+ /**
+ * Returns an unmodifiable set of names of non-stored docValues fields, except those that are targets of a copy field.
+ */
+ public Set<String> getNonStoredDVsWithoutCopyTargets() {
+ return nonStoredDVsWithoutCopyTargets;
+ }
+
/* ********************** end document retrieval *************************/
////////////////////////////////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7777599d/solr/core/src/test-files/solr/collection1/conf/schema.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema.xml b/solr/core/src/test-files/solr/collection1/conf/schema.xml
index 41626fb..cfb1789 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema.xml
@@ -646,20 +646,30 @@
<dynamicField name="*_sev_enum" type="severityType" indexed="true" stored="true" docValues="true" multiValued="true" />
<!-- With DocValues=true -->
- <dynamicField name="*_i_dv" type="int" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_l_dv" type="long" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_f_dv" type="float" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_d_dv" type="double" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_dt_dv" type="date" indexed="true" stored="true" docValues="true"/>
- <dynamicField name="*_f1_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false"/>
+ <dynamicField name="*_i_dv" type="int" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_l_dv" type="long" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_f_dv" type="float" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_d_dv" type="double" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_dt_dv" type="date" indexed="true" stored="true" docValues="true" />
+ <dynamicField name="*_f1_dv" type="float" indexed="true" stored="true" docValues="true" multiValued="false" />
<!-- Non-stored, DocValues=true -->
- <dynamicField name="*_i_dvo" multiValued="false" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_d_dvo" multiValued="false" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_s_dvo" multiValued="false" type="string" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_ii_dvo" multiValued="true" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
- <dynamicField name="*_dd_dvo" multiValued="true" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true"/>
-
+ <dynamicField name="*_i_dvo" multiValued="false" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_d_dvo" multiValued="false" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_s_dvo" multiValued="false" type="string" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_ii_dvo" multiValued="true" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+ <dynamicField name="*_dd_dvo" multiValued="true" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="true" />
+
+ <!-- Non-stored, DocValues=true, useDocValuesAsStored=false -->
+ <field name="single_i_dvn" multiValued="false" type="int" indexed="true" stored="true" />
+ <field name="single_d_dvn" multiValued="false" type="double" indexed="true" stored="true" />
+ <field name="single_s_dvn" multiValued="false" type="string" indexed="true" stored="true" />
+ <field name="copy_single_i_dvn" multiValued="false" type="int" docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
+ <field name="copy_single_d_dvn" multiValued="false" type="double" docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
+ <field name="copy_single_s_dvn" multiValued="false" type="string" docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
+ <copyField source="single_i_dvn" dest="copy_single_i_dvn" />
+ <copyField source="single_d_dvn" dest="copy_single_d_dvn" />
+ <copyField source="single_s_dvn" dest="copy_single_s_dvn" />
</fields>
<defaultSearchField>text</defaultSearchField>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7777599d/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
index 09fa721..b67ea7e 100644
--- a/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
+++ b/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
@@ -43,6 +43,7 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {
h.update("<delete><query>*:*</query></delete>");
assertU(commit());
}
+
@Test
public void testRemove() throws Exception {
SolrInputDocument doc;
@@ -1065,6 +1066,49 @@ public class AtomicUpdatesTest extends SolrTestCaseJ4 {
"/response/docs/[0]/multi_ii_dvo/[0]==100",
"/response/docs/[0]/multi_ii_dvo/[1]==" + Integer.MAX_VALUE);
}
+
+ @Test
+ public void testAtomicUpdatesOnNonStoredDocValuesCopyField() throws Exception {
+ assertU(adoc(sdoc("id", 101, "title", "title2", "single_i_dvn", 100)));
+ assertU(adoc(sdoc("id", 102, "title", "title3", "single_d_dvn", 3.14)));
+ assertU(adoc(sdoc("id", 103, "single_s_dvn", "abc", "single_i_dvn", 1)));
+ assertU(commit());
+
+ // Do each one twice... the first time it will be retrieved from the index, and the second time from the transaction log.
+ for (int i=0; i<2; i++) {
+ assertU(adoc(sdoc("id", 101, "title", ImmutableMap.of("set", "newtitle2"),
+ "single_i_dvn", ImmutableMap.of("inc", 1))));
+ assertU(adoc(sdoc("id", 102, "title", ImmutableMap.of("set", "newtitle3"),
+ "single_d_dvn", ImmutableMap.of("inc", 1))));
+ assertU(adoc(sdoc("id", 103, "single_i_dvn", ImmutableMap.of("inc", 1))));
+ }
+ assertU(commit());
+
+ assertJQ(req("q", "id:101"),
+ "/response/docs/[0]/id==101",
+ "/response/docs/[0]/title/[0]=='newtitle2'",
+ "/response/docs/[0]/single_i_dvn==102");
+
+ assertJQ(req("q", "id:102"),
+ 1e-4,
+ "/response/docs/[0]/id==102",
+ "/response/docs/[0]/title/[0]=='newtitle3'",
+ "/response/docs/[0]/single_d_dvn==5.14");
+
+ assertJQ(req("q", "id:103"),
+ "/response/docs/[0]/id==103",
+ "/response/docs/[0]/single_s_dvn=='abc'",
+ "/response/docs/[0]/single_i_dvn==3");
+
+ // test that non stored docvalues was carried forward for a non-docvalue update
+ assertU(adoc(sdoc("id", 103, "single_s_dvn", ImmutableMap.of("set", "abcupdate"),
+ "single_i_dvn", ImmutableMap.of("set", 5))));
+ assertU(commit());
+ assertJQ(req("q", "id:103"),
+ "/response/docs/[0]/id==103",
+ "/response/docs/[0]/single_s_dvn=='abcupdate'",
+ "/response/docs/[0]/single_i_dvn==5");
+ }
@Test
public void testInvalidOperation() {
[3/3] lucene-solr:branch_5_5: SOLR-9034: Add 5.5.2 CHANGES entry
Posted by sa...@apache.org.
SOLR-9034: Add 5.5.2 CHANGES entry
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6f06e56c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6f06e56c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6f06e56c
Branch: refs/heads/branch_5_5
Commit: 6f06e56c735b51ee79497fdfc51ca6ac46de863e
Parents: 7777599
Author: Steve Rowe <sa...@apache.org>
Authored: Tue Jun 14 13:19:09 2016 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Jun 14 13:19:09 2016 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6f06e56c/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ac59af2..1965c54 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -10,7 +10,19 @@ See http://lucene.apache.org/solr for more information.
======================= 5.5.2 =======================
+Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+Versions of Major Components
+---------------------
+Apache Tika 1.7
+Carrot2 3.10.4
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.6
+Jetty 9.2.13.v20150730
+
Bug Fixes
+---------------------
* SOLR-9198: config APIs unable to add multiple values with same name (noble)
@@ -20,6 +32,9 @@ Bug Fixes
and there are explicit operators (except for AND) - addresses problems caused by SOLR-2649.
(Greg Pendlebury, Jan H�ydahl, Erick Erickson, Steve Rowe)
+* SOLR-9034: Atomic updates failed to work when there were copyField targets that had docValues
+ enabled. (Karthik Ramachandran, Ishan Chattopadhyaya, yonik)
+
======================= 5.5.1 =======================
Bug Fixes