lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [lucene-solr] 02/05: Merge branch 'master' into jira/solr-11127-2
Date Tue, 12 Mar 2019 18:35:32 GMT
This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch jira/solr-11127-2
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 3f0b1c2681cd8d9c4860795150250fd7da2dc76d
Merge: 675dd0b d8cfeba
Author: Andrzej Bialecki <ab@apache.org>
AuthorDate: Mon Mar 11 11:07:36 2019 +0100

    Merge branch 'master' into jira/solr-11127-2

 lucene/CHANGES.txt                                 |   3 +
 .../org/apache/lucene/search/SynonymQuery.java     | 261 ++++++++--
 .../java/org/apache/lucene/util/QueryBuilder.java  |   8 +-
 .../apache/lucene/search/TestMatchesIterator.java  |   6 +-
 .../lucene/search/TestSimpleExplanations.java      |   5 +-
 .../lucene/search/TestSimpleSearchEquivalence.java |   2 +-
 .../org/apache/lucene/search/TestSynonymQuery.java | 161 ++++++-
 .../org/apache/lucene/util/TestQueryBuilder.java   |  40 +-
 .../lucene/search/highlight/HighlighterTest.java   |   5 +-
 .../vectorhighlight/FastVectorHighlighterTest.java |   5 +-
 .../queryparser/classic/TestQueryParser.java       |  52 +-
 .../java/org/apache/lucene/search/BM25FQuery.java  |   6 +-
 .../org/apache/lucene/search/TestBM25FQuery.java   |   6 +-
 .../tools/src/groovy/check-source-patterns.groovy  |   6 +
 solr/CHANGES.txt                                   |  19 +-
 solr/bin/solr.cmd                                  |   7 +-
 .../apache/solr/ltr/TestLTRReRankingPipeline.java  |   4 +-
 .../org/apache/solr/ltr/TestLTRScoringQuery.java   |   4 +-
 .../solr/ltr/feature/TestOriginalScoreScorer.java  |   4 +-
 .../src/java/org/apache/solr/api/V2HttpCall.java   |  28 +-
 .../org/apache/solr/handler/admin/ColStatus.java   | 197 ++++++++
 .../solr/handler/admin/CollectionsHandler.java     |  16 +
 .../handler/admin/SegmentsInfoRequestHandler.java  | 350 +++++++++++++-
 .../apache/solr/handler/export/ExportWriter.java   |  10 +-
 .../java/org/apache/solr/servlet/HttpSolrCall.java |  18 +-
 .../org/apache/solr/update/SolrIndexWriter.java    |  19 +-
 .../processor/DistributedUpdateProcessor.java      |   3 -
 .../java/org/apache/solr/util/TestInjection.java   |  13 -
 .../collection1/conf/schema-sortingresponse.xml    |   3 +
 .../test/org/apache/solr/TestDocumentBuilder.java  |   3 +-
 ...aosMonkeyNothingIsSafeWithPullReplicasTest.java |   1 -
 .../ChaosMonkeySafeLeaderWithPullReplicasTest.java |   1 -
 .../apache/solr/cloud/CollectionsAPISolrJTest.java |  30 ++
 .../org/apache/solr/cloud/ForceLeaderTest.java     |  30 +-
 .../cloud/ForceLeaderWithTlogReplicasTest.java}    |  16 +-
 .../org/apache/solr/cloud/HttpPartitionTest.java   |  13 +-
 .../cloud/HttpPartitionWithTlogReplicasTest.java}  |  22 +-
 .../solr/cloud/RecoveryAfterSoftCommitTest.java    |   1 -
 .../org/apache/solr/cloud/TestPullReplica.java     |   1 -
 .../solr/cloud/TestPullReplicaErrorHandling.java   |   3 +-
 .../org/apache/solr/cloud/TestTlogReplica.java     |   3 +-
 .../cloud/autoscaling/sim/TestSimLargeCluster.java | 156 +++---
 .../org/apache/solr/core/DirectoryFactoryTest.java |   4 +-
 .../apache/solr/core/OpenCloseCoreStressTest.java  | 525 ---------------------
 .../apache/solr/core/RAMDirectoryFactoryTest.java  |   4 +-
 .../org/apache/solr/core/TestConfigOverlay.java    |   4 +-
 .../apache/solr/handler/BackupRestoreUtils.java    |   4 +-
 .../apache/solr/handler/V2ApiIntegrationTest.java  |  29 ++
 .../admin/SegmentsInfoRequestHandlerTest.java      |  27 ++
 .../solr/handler/admin/SystemInfoHandlerTest.java  |   4 +-
 .../component/ReplicaListTransformerTest.java      |   5 +-
 .../ShufflingReplicaListTransformerTest.java       |   4 +-
 .../solr/handler/export/TestExportWriter.java      |  34 +-
 .../solr/index/TestSlowCompositeReaderWrapper.java |   4 +-
 .../org/apache/solr/legacy/TestLegacyField.java    |   4 +-
 .../apache/solr/legacy/TestLegacyNumericUtils.java |   4 +-
 .../org/apache/solr/legacy/TestLegacyTerms.java    |   4 +-
 .../legacy/TestMultiValuedNumericRangeQuery.java   |   4 +-
 .../solr/legacy/TestNumericRangeQuery32.java       |   4 +-
 .../solr/legacy/TestNumericRangeQuery64.java       |   4 +-
 .../org/apache/solr/logging/TestLogWatcher.java    |  21 +-
 .../solr/request/RegexBytesRefFilterTest.java      |   4 +-
 .../solr/request/SubstringBytesRefFilterTest.java  |   4 +-
 .../org/apache/solr/request/TestFacetMethods.java  |   4 +-
 .../solr/request/macro/TestMacroExpander.java      |   5 +-
 .../solr/response/TestSolrQueryResponse.java       |   4 +-
 .../test/org/apache/solr/search/TestDocSet.java    |   4 +-
 .../org/apache/solr/search/TestFastLRUCache.java   |   4 +-
 .../apache/solr/search/TestFilteredDocIdSet.java   |   4 +-
 .../test/org/apache/solr/search/TestLRUCache.java  |   4 +-
 .../search/TestLegacyNumericRangeQueryBuilder.java |   4 +-
 .../org/apache/solr/search/TestSolrCoreParser.java |   4 +-
 .../apache/solr/search/TestStandardQParsers.java   |   4 +-
 .../org/apache/solr/search/TestXmlQParser.java     |  42 --
 .../apache/solr/search/function/TestOrdValues.java |   4 +-
 .../spelling/ConjunctionSolrSpellCheckerTest.java  |   4 +-
 .../solr/spelling/SpellingQueryConverterTest.java  |   4 +-
 .../solr/store/blockcache/BlockCacheTest.java      |   3 +-
 .../solr/store/blockcache/BufferStoreTest.java     |   4 +-
 .../apache/solr/uninverting/TestDocTermOrds.java   |   4 +-
 .../uninverting/TestDocTermOrdsUninvertLimit.java  |   4 +-
 .../apache/solr/uninverting/TestFieldCache.java    |   4 +-
 .../solr/uninverting/TestFieldCacheReopen.java     |   4 +-
 .../solr/uninverting/TestFieldCacheSort.java       |   4 +-
 .../solr/uninverting/TestFieldCacheSortRandom.java |   4 +-
 .../uninverting/TestFieldCacheVsDocValues.java     |   4 +-
 .../uninverting/TestFieldCacheWithThreads.java     |   4 +-
 .../solr/uninverting/TestLegacyFieldCache.java     |   4 +-
 .../solr/uninverting/TestNumericTerms32.java       |   4 +-
 .../solr/uninverting/TestNumericTerms64.java       |   4 +-
 .../solr/uninverting/TestUninvertingReader.java    |   4 +-
 .../org/apache/solr/update/TransactionLogTest.java |   4 +-
 .../IgnoreLargeDocumentProcessorFactoryTest.java   |   4 +-
 .../solr/update/processor/ScriptEngineTest.java    |   4 +-
 .../org/apache/solr/util/CircularListTest.java     |   4 +-
 .../org/apache/solr/util/DistanceUnitsTest.java    |   4 +-
 .../test/org/apache/solr/util/FileUtilsTest.java   |   4 +-
 .../org/apache/solr/util/OrderedExecutorTest.java  |   4 +-
 .../test/org/apache/solr/util/PrimUtilsTest.java   |   4 +-
 .../org/apache/solr/util/TestFastOutputStream.java |   4 +-
 .../test/org/apache/solr/util/TestRTimerTree.java  |   4 +-
 .../org/apache/solr/util/TestSafeXMLParsing.java   |   4 +-
 .../org/apache/solr/util/TestTestInjection.java    |   4 +-
 .../org/apache/solr/util/TimeZoneUtilsTest.java    |   4 +-
 .../BigEndianAscendingWordDeserializerTest.java    |   5 +-
 .../hll/BigEndianAscendingWordSerializerTest.java  |   4 +-
 .../org/apache/solr/util/hll/BitVectorTest.java    |   4 +-
 .../org/apache/solr/util/hll/ExplicitHLLTest.java  |   4 +-
 .../test/org/apache/solr/util/hll/FullHLLTest.java |   4 +-
 .../apache/solr/util/hll/HLLSerializationTest.java |   4 +-
 .../test/org/apache/solr/util/hll/HLLUtilTest.java |   4 +-
 .../org/apache/solr/util/hll/SparseHLLTest.java    |   4 +-
 solr/solr-ref-guide/src/collections-api.adoc       | 186 ++++++++
 solr/solr-ref-guide/src/response-writers.adoc      |   6 +-
 .../working-with-external-files-and-processes.adoc |   4 +-
 .../solrj/request/CollectionAdminRequest.java      |  48 ++
 .../solr/common/cloud/ConnectionManager.java       |   2 +-
 .../org/apache/solr/common/luke/FieldFlag.java     |   4 +
 .../solr/common/params/CollectionParams.java       |   1 +
 .../CollectionAdminRequestRequiredParamsTest.java  |   4 +-
 .../solr/client/solrj/SolrExceptionTest.java       |   4 +-
 .../apache/solr/client/solrj/SolrQueryTest.java    |   4 +-
 .../solrj/beans/TestDocumentObjectBinder.java      |   5 +-
 .../impl/CloudHttp2SolrClientBuilderTest.java      |   4 +-
 .../CloudHttp2SolrClientMultiConstructorTest.java  |   4 +-
 .../solrj/impl/CloudSolrClientBuilderTest.java     |   4 +-
 .../impl/CloudSolrClientMultiConstructorTest.java  |   4 +-
 .../ConcurrentUpdateSolrClientBuilderTest.java     |   4 +-
 .../solr/client/solrj/impl/HttpClientUtilTest.java |   8 +-
 .../solrj/impl/HttpSolrClientBuilderTest.java      |   4 +-
 .../solrj/impl/LBHttpSolrClientBuilderTest.java    |   4 +-
 .../org/apache/solr/client/solrj/io/TestLang.java  |   3 +-
 .../io/stream/StreamExpressionToExpessionTest.java |   4 +-
 .../stream/StreamExpressionToExplanationTest.java  |   4 +-
 .../io/stream/eval/AbsoluteValueEvaluatorTest.java |   4 +-
 .../solrj/io/stream/eval/AddEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/AndEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/AppendEvaluatorTest.java  |   4 +-
 .../io/stream/eval/ArcCosineEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/ArcSineEvaluatorTest.java |   4 +-
 .../io/stream/eval/ArcTangentEvaluatorTest.java    |   4 +-
 .../solrj/io/stream/eval/ArrayEvaluatorTest.java   |   4 +-
 .../solrj/io/stream/eval/AscEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/CeilingEvaluatorTest.java |   4 +-
 .../io/stream/eval/CoalesceEvaluatorTest.java      |   4 +-
 .../io/stream/eval/CorrelationEvaluatorTest.java   |   4 +-
 .../solrj/io/stream/eval/CosineEvaluatorTest.java  |   4 +-
 .../io/stream/eval/CubedRootEvaluatorTest.java     |   4 +-
 .../eval/CumulativeProbabilityEvaluatorTest.java   |   4 +-
 .../solrj/io/stream/eval/DivideEvaluatorTest.java  |   4 +-
 .../eval/EmpiricalDistributionEvaluatorTest.java   |   4 +-
 .../solrj/io/stream/eval/EqualToEvaluatorTest.java |   4 +-
 .../io/stream/eval/ExclusiveOrEvaluatorTest.java   |   4 +-
 .../io/stream/eval/FieldValueEvaluatorTest.java    |   4 +-
 .../solrj/io/stream/eval/FloorEvaluatorTest.java   |   4 +-
 .../eval/GreaterThanEqualToEvaluatorTest.java      |   4 +-
 .../io/stream/eval/GreaterThanEvaluatorTest.java   |   4 +-
 .../stream/eval/HyperbolicCosineEvaluatorTest.java |   4 +-
 .../stream/eval/HyperbolicSineEvaluatorTest.java   |   4 +-
 .../eval/HyperbolicTangentEvaluatorTest.java       |   4 +-
 .../solrj/io/stream/eval/LengthEvaluatorTest.java  |   4 +-
 .../stream/eval/LessThanEqualToEvaluatorTest.java  |   4 +-
 .../io/stream/eval/LessThanEvaluatorTest.java      |   4 +-
 .../solrj/io/stream/eval/ModuloEvaluatorTest.java  |   4 +-
 .../io/stream/eval/MultiplyEvaluatorTest.java      |   4 +-
 .../io/stream/eval/NaturalLogEvaluatorTest.java    |   4 +-
 .../eval/NormalDistributionEvaluatorTest.java      |   4 +-
 .../io/stream/eval/NormalizeEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/NotEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/OrEvaluatorTest.java      |   4 +-
 .../solrj/io/stream/eval/PowerEvaluatorTest.java   |   4 +-
 .../io/stream/eval/RawValueEvaluatorTest.java      |   4 +-
 .../io/stream/eval/RecursiveEvaluatorTest.java     |   4 +-
 .../io/stream/eval/RegressionEvaluatorTest.java    |   4 +-
 .../solrj/io/stream/eval/ReverseEvaluatorTest.java |   4 +-
 .../solrj/io/stream/eval/RoundEvaluatorTest.java   |   4 +-
 .../solrj/io/stream/eval/SineEvaluatorTest.java    |   4 +-
 .../io/stream/eval/SquareRootEvaluatorTest.java    |   4 +-
 .../io/stream/eval/SubtractEvaluatorTest.java      |   4 +-
 .../solrj/io/stream/eval/TangentEvaluatorTest.java |   4 +-
 .../eval/UniformDistributionEvaluatorTest.java     |   4 +-
 .../solrj/io/stream/eval/UuidEvaluatorTest.java    |   4 +-
 .../io/stream/expr/StreamExpressionParserTest.java |   5 +-
 .../solrj/io/stream/ops/ConcatOperationTest.java   |   4 +-
 .../client/solrj/io/stream/ops/OperationsTest.java |   4 +-
 .../solrj/request/TestCollectionAdminRequest.java  |   4 +-
 .../solrj/request/TestDelegationTokenRequest.java  |   5 +-
 .../solrj/request/TestUpdateRequestCodec.java      |   4 +-
 .../client/solrj/request/TestV1toV2ApiMapper.java  |   4 +-
 .../request/json/JsonQueryRequestUnitTest.java     |   4 +-
 .../solrj/response/AnlysisResponseBaseTest.java    |   4 +-
 .../response/DocumentAnalysisResponseTest.java     |   4 +-
 .../solr/client/solrj/response/FacetFieldTest.java |   4 +-
 .../solrj/response/FieldAnalysisResponseTest.java  |   4 +-
 .../client/solrj/response/QueryResponseTest.java   |   4 +-
 .../response/TestDelegationTokenResponse.java      |   4 +-
 .../solr/client/solrj/util/ClientUtilsTest.java    |   4 +-
 .../org/apache/solr/common/SolrDocumentTest.java   |   4 +-
 .../solr/common/TestToleratedUpdateError.java      |   4 +-
 .../solr/common/params/CommonAdminParamsTest.java  |   4 +-
 .../solr/common/params/CommonParamsTest.java       |   4 +-
 .../common/params/ModifiableSolrParamsTest.java    |   4 +-
 .../apache/solr/common/params/ShardParamsTest.java |   4 +-
 .../apache/solr/common/params/SolrParamTest.java   |   4 +-
 .../org/apache/solr/common/util/NamedListTest.java |   4 +-
 .../solr/common/util/TestFastInputStream.java      |   4 +-
 .../apache/solr/common/util/TestFastWriter.java    |   4 +-
 .../test/org/apache/solr/common/util/TestHash.java |   4 +-
 .../solr/common/util/TestNamedListCodec.java       |   4 +-
 .../apache/solr/common/util/TestXMLEscaping.java   |   4 +-
 .../src/java/org/apache/solr/SolrTestCase.java     |  48 ++
 .../src/java/org/apache/solr/SolrTestCaseJ4.java   |  11 +-
 .../java/org/apache/solr/util/DOMUtilTestBase.java |   4 +-
 .../solr/cloud/MiniSolrCloudClusterTest.java       |   3 +-
 214 files changed, 1964 insertions(+), 1200 deletions(-)

diff --cc solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
index dee2d1d,cbff8d4..ddfe90e
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
@@@ -784,68 -784,54 +784,116 @@@ public abstract class CollectionAdminRe
    }
  
    /**
 +   * Returns a SolrRequest to reindex a collection
 +   */
 +  public static ReindexCollection reindexCollection(String collection) {
 +    return new ReindexCollection(collection);
 +  }
 +
 +  public static class ReindexCollection extends AsyncCollectionSpecificAdminRequest {
 +    String target;
 +    String query;
 +    String configName;
 +    Boolean keepSource;
 +    Integer batchSize;
 +    Map<String, Object> collectionParams = new HashMap<>();
 +
 +    private ReindexCollection(String collection) {
 +      super(CollectionAction.REINDEX_COLLECTION, collection);
 +    }
 +
 +    public ReindexCollection setTarget(String target) {
 +      this.target = target;
 +      return this;
 +    }
 +
 +    public ReindexCollection setQuery(String query) {
 +      this.query = query;
 +      return this;
 +    }
 +
 +    public ReindexCollection setKeepSource(boolean keepSource) {
 +      this.keepSource = keepSource;
 +      return this;
 +    }
 +
 +    public ReindexCollection setBatchSize(int batchSize) {
 +      this.batchSize = batchSize;
 +      return this;
 +    }
 +
 +    public ReindexCollection setConfigName(String configName) {
 +      this.configName = configName;
 +      return this;
 +    }
 +
 +    public ReindexCollection setCollectionParam(String key, Object value) {
 +      this.collectionParams.put(key, value);
 +      return this;
 +    }
 +
 +    @Override
 +    public SolrParams getParams() {
 +      ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
 +      params.setNonNull("target", target);
 +      params.setNonNull(ZkStateReader.CONFIGNAME_PROP, configName);
 +      params.setNonNull(CommonParams.Q, query);
 +      params.setNonNull("keepSource", keepSource);
 +      params.setNonNull(CommonParams.ROWS, batchSize);
 +      collectionParams.forEach((k, v) -> params.setNonNull(k, v));
 +      return params;
 +    }
 +  }
 +
 +  /**
+    * Return a SolrRequest for low-level detailed status of the collection.
+    */
+   public static ColStatus collectionStatus(String collection) {
+     return new ColStatus(collection);
+   }
+ 
+   public static class ColStatus extends AsyncCollectionSpecificAdminRequest {
+     protected Boolean withSegments = null;
+     protected Boolean withFieldInfo = null;
+     protected Boolean withCoreInfo = null;
+     protected Boolean withSizeInfo = null;
+ 
+     private ColStatus(String collection) {
+       super(CollectionAction.COLSTATUS, collection);
+     }
+ 
+     public ColStatus setWithSegments(boolean withSegments) {
+       this.withSegments = withSegments;
+       return this;
+     }
+ 
+     public ColStatus setWithFieldInfo(boolean withFieldInfo) {
+       this.withFieldInfo = withFieldInfo;
+       return this;
+     }
+ 
+     public ColStatus setWithCoreInfo(boolean withCoreInfo) {
+       this.withCoreInfo = withCoreInfo;
+       return this;
+     }
+ 
+     public ColStatus setWithSizeInfo(boolean withSizeInfo) {
+       this.withSizeInfo = withSizeInfo;
+       return this;
+     }
+ 
+     @Override
+     public SolrParams getParams() {
+       ModifiableSolrParams params = (ModifiableSolrParams)super.getParams();
+       params.setNonNull("segments", withSegments.toString());
+       params.setNonNull("fieldInfo", withFieldInfo.toString());
+       params.setNonNull("coreInfo", withCoreInfo.toString());
+       params.setNonNull("sizeInfo", withSizeInfo.toString());
+       return params;
+     }
+   }
+ 
+   /**
     * Returns a SolrRequest to delete a collection
     */
    public static Delete deleteCollection(String collection) {
diff --cc solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
index 6176263,a9e00e9..df97c35
--- a/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
@@@ -122,7 -122,7 +122,8 @@@ public interface CollectionParams 
      NONE(false, LockLevel.NONE),
      // TODO: not implemented yet
      MERGESHARDS(true, LockLevel.SHARD),
 -    COLSTATUS(true, LockLevel.NONE)
++    COLSTATUS(true, LockLevel.NONE),
 +    REINDEX_COLLECTION(true, LockLevel.COLLECTION)
      ;
      public final boolean isWrite;
  


Mime
View raw message