remove workaround for Solr bug regarding multivalued date fields

fixed in 5.4.0
http://issues.apache.org/jira/browse/SOLR-8050
pull/38/head
reger 9 years ago
parent 5a35f9383a
commit 1af0e9ef74

@ -2512,11 +2512,15 @@ public final class Switchboard extends serverSwitch {
// 2015-09-12 Solr v5.2.1 & v5.3
// this hack switches partial update off (if multivalued datefield _dts exists, like: dates_in_content_dts startDates_dts endDates_dts)
boolean partialUpdate = getConfigBool("postprocessing.partialUpdate", true);
/* Solr 5.4.0 bugfix see http://issues.apache.org/jira/browse/SOLR-8050 Partial update on document with multivalued date field fails
*
for (String sf : index.fulltext().getDefaultConfiguration().keySet()) {
if (sf.endsWith("_dts")) {
partialUpdate = false;
}
}
*/
if (allCrawlsFinished) {
// refresh the search cache
SearchEventCache.cleanupEvents(true);

@ -121,6 +121,8 @@ public class EmbeddedSolrConnectorTest {
* Test for partial update for document containing a multivalued date field
* this is a Solr issue (2015-09-12)
* the test case is just to demonstrate the effect on YaCy (currently catching the solr exception and reinserting a document with fields missing)
*
* Solr 5.4.0 bugfix @see http://issues.apache.org/jira/browse/SOLR-8050 Partial update on document with multivalued date field fails
*/
@Test
public void testUdate_withMultivaluedDateField() throws SolrException, IOException {
@ -142,7 +144,7 @@ public class EmbeddedSolrConnectorTest {
fieldnames.addAll(doc.getFieldNames());
SolrInputDocument sid = new SolrInputDocument();
sid.addField(CollectionSchema.id.name(), doc.getFieldValue(CollectionSchema.id.name()));
sid.addField(CollectionSchema.id.name(), id);
sid.addField(CollectionSchema.host_s.name(), "yacy.yacy");
solr.update(sid);
solr.commit(true);

Loading…
Cancel
Save