You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2016/10/26 06:00:59 UTC
lucene-solr:branch_6x: SOLR-2212: Add a factory class corresponding
to Lucene's NoMergePolicy
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 279647a30 -> 3628b0a0c
SOLR-2212: Add a factory class corresponding to Lucene's NoMergePolicy
(cherry picked from commit 768c7e2)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3628b0a0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3628b0a0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3628b0a0
Branch: refs/heads/branch_6x
Commit: 3628b0a0c859b59f72324139bcf163f323afd6e3
Parents: 279647a
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Wed Oct 26 11:28:53 2016 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Wed Oct 26 11:31:00 2016 +0530
----------------------------------------------------------------------
solr/CHANGES.txt | 53 ++++++++++++++++++++
.../apache/solr/index/NoMergePolicyFactory.java | 34 +++++++++++++
.../conf/solrconfig-nomergepolicyfactory.xml | 32 ++++++++++++
.../apache/solr/core/TestMergePolicyConfig.java | 20 ++++++++
4 files changed, 139 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3628b0a0/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 7c0ae1b..68a979b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -16,6 +16,53 @@ In this release, there is an example Solr server including a bundled
servlet container in the directory named "example".
See the Quick Start guide at http://lucene.apache.org/solr/quickstart.html
+================== 7.0.0 ==================
+
+Upgrading from Solr 6.x
+----------------------
+
+* HttpClientInterceptorPlugin is now HttpClientBuilderPlugin and must work with a
+ SolrHttpClientBuilder rather than an HttpClientConfigurer.
+
+* HttpClientUtil now allows configuring HttpClient instances via SolrHttpClientBuilder
+ rather than an HttpClientConfigurer. Use of env variable SOLR_AUTHENTICATION_CLIENT_CONFIGURER
+ no longer works, please use SOLR_AUTHENTICATION_CLIENT_BUILDER
+
+* SolrClient implementations now use their own internal configuration for socket timeouts,
+ connect timeouts, and allowing redirects rather than what is set as the default when
+ building the HttpClient instance. Use the appropriate setters on the SolrClient instance.
+
+* HttpSolrClient#setAllowCompression has been removed and compression must be enabled as
+ a constructor param.
+
+* HttpSolrClient#setDefaultMaxConnectionsPerHost and
+ HttpSolrClient#setMaxTotalConnections have been removed. These now default very
+ high and can only be changed via param when creating an HttpClient instance.
+
+* Query time join with scoring {!join score=none} (even none) doesn't handle single value numeric fields.
+ Users are advised to convert these fields into string and reindex.
+
+* Deprecated collection and configset methods on MiniSolrCloudCluster have been
+ removed
+
+Bug Fixes
+----------------------
+* SOLR-9262: Connection and read timeouts are being ignored by UpdateShardHandler after SOLR-4509.
+ (Mark Miller, shalin)
+
+Optimizations
+----------------------
+
+* SOLR-4509: Move to non deprecated HttpClient impl classes to remove stale connection
+ check on every request and move connection lifecycle management towards the client.
+ (Ryan Zezeski, Mark Miller, Shawn Heisey, Steve Davids)
+
+* SOLR-9255: Rename SOLR_AUTHENTICATION_CLIENT_CONFIGURER -> SOLR_AUTHENTICATION_CLIENT_BUILDER (janhoy)
+
+* SOLR-9579: Make Solr's SchemaField implement Lucene's IndexableFieldType, removing the
+ creation of a Lucene FieldType every time a field is indexed. (John Call, yonik)
+
+
================== 6.3.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
@@ -117,6 +164,12 @@ New Features
* SOLR-9654: Add "overrequest" parameter to JSON Facet API to control amount of overrequest
on a distributed terms facet. (yonik)
+* SOLR-9481: Authentication and Authorization plugins now work in standalone mode if security.json is placed in
+ SOLR_HOME on every node. Editing config through API is supported but affects only that one node.
+ (janhoy)
+
+* SOLR-2212: Add a factory class corresponding to Lucene's NoMergePolicy. (Lance Norskog, Cao Manh Dat via shalin)
+
Bug Fixes
----------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3628b0a0/solr/core/src/java/org/apache/solr/index/NoMergePolicyFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/index/NoMergePolicyFactory.java b/solr/core/src/java/org/apache/solr/index/NoMergePolicyFactory.java
new file mode 100644
index 0000000..66fa18e
--- /dev/null
+++ b/solr/core/src/java/org/apache/solr/index/NoMergePolicyFactory.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.index;
+
+import org.apache.lucene.index.MergePolicy;
+import org.apache.lucene.index.NoMergePolicy;
+import org.apache.solr.core.SolrResourceLoader;
+import org.apache.solr.schema.IndexSchema;
+
+public class NoMergePolicyFactory extends SimpleMergePolicyFactory {
+ public NoMergePolicyFactory(SolrResourceLoader resourceLoader, MergePolicyFactoryArgs args, IndexSchema schema) {
+ super(resourceLoader, args, schema);
+ }
+
+ @Override
+ protected MergePolicy getMergePolicyInstance() {
+ return NoMergePolicy.INSTANCE;
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3628b0a0/solr/core/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml
new file mode 100644
index 0000000..a9e3801
--- /dev/null
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-nomergepolicyfactory.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<config>
+ <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
+ <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
+ <schemaFactory class="ClassicIndexSchemaFactory"/>
+
+ <indexConfig>
+ <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
+ <mergePolicyFactory class="org.apache.solr.index.NoMergePolicyFactory" />
+ </indexConfig>
+
+ <requestHandler name="standard" class="solr.StandardRequestHandler"></requestHandler>
+
+</config>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3628b0a0/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java b/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
index fd13a8e..f8e232a 100644
--- a/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestMergePolicyConfig.java
@@ -24,6 +24,7 @@ import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.LogByteSizeMergePolicy;
import org.apache.lucene.index.LogDocMergePolicy;
import org.apache.lucene.index.LogMergePolicy;
+import org.apache.lucene.index.NoMergePolicy;
import org.apache.lucene.index.SegmentReader;
import org.apache.lucene.index.TieredMergePolicy;
import org.apache.solr.SolrTestCaseJ4;
@@ -128,6 +129,25 @@ public class TestMergePolicyConfig extends SolrTestCaseJ4 {
assertCompoundSegments(h.getCore(), false);
}
+ public void testNoMergePolicyFactoryConfig() throws Exception {
+ initCore("solrconfig-nomergepolicyfactory.xml","schema-minimal.xml");
+ IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore());
+ NoMergePolicy mergePolicy = assertAndCast(NoMergePolicy.class,
+ iwc.getMergePolicy());
+
+ assertCommitSomeNewDocs();
+
+ assertCommitSomeNewDocs();
+ assertNumSegments(h.getCore(), 2);
+
+ assertU(optimize());
+ assertNumSegments(h.getCore(), 2);
+ deleteCore();
+ initCore("solrconfig-nomergepolicyfactory.xml","schema-minimal.xml");
+ iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore());
+ assertEquals(mergePolicy, iwc.getMergePolicy());
+ }
+
public void testLogMergePolicyConfig() throws Exception {
final Class<? extends LogMergePolicy> mpClass = random().nextBoolean()