You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2018/03/22 15:10:55 UTC

[1/2] lucene-solr:master: LUCENE-8219: Do a better job of estimating automaton array sizes up front, to save on reallocation. Committed on behalf of Christian Ziech.

Repository: lucene-solr
Updated Branches:
  refs/heads/master 92f1cdebf -> ea12b5fd2


LUCENE-8219: Do a better job of estimating automaton array sizes up front, to save on reallocation.  Committed on behalf of Christian Ziech.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7cadada4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7cadada4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7cadada4

Branch: refs/heads/master
Commit: 7cadada441d7e10fc1271cf5b68f76efcdfdbc9b
Parents: a832411
Author: Karl Wright <Da...@gmail.com>
Authored: Thu Mar 22 11:10:29 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Thu Mar 22 11:10:29 2018 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                                             | 4 ++++
 .../org/apache/lucene/util/automaton/LevenshteinAutomata.java  | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7cadada4/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 2769098..77508c4 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -105,6 +105,10 @@ New Features
 
 Other
 
+* LUCENE-8219: Use a realistic estimate of the number of nodes and links in
+   LevensteinAutomaton.java, to save reallocation of arrays.
+   (Christian Ziech)
+
 * LUCENE-8214: Improve selection of testPoint for GeoComplexPolygon.
   (Ignacio Vera)
   

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7cadada4/lucene/core/src/java/org/apache/lucene/util/automaton/LevenshteinAutomata.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/automaton/LevenshteinAutomata.java b/lucene/core/src/java/org/apache/lucene/util/automaton/LevenshteinAutomata.java
index 4a07f4b..bee3c00 100644
--- a/lucene/core/src/java/org/apache/lucene/util/automaton/LevenshteinAutomata.java
+++ b/lucene/core/src/java/org/apache/lucene/util/automaton/LevenshteinAutomata.java
@@ -152,9 +152,11 @@ public class LevenshteinAutomata {
     final int range = 2*n+1;
     ParametricDescription description = descriptions[n];
     // the number of states is based on the length of the word and n
-    int numStates = description.size();
+    final int numStates = description.size();
+    final int numTransitions = numStates * Math.min(1 + 2 * n, alphabet.length);
+    final int prefixStates = prefix != null ? prefix.codePointCount(0, prefix.length()) : 0;
 
-    Automaton a = new Automaton();
+    final Automaton a = new Automaton(numStates + prefixStates, numTransitions);
     int lastState;
     if (prefix != null) {
       // Insert prefix


[2/2] lucene-solr:master: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr

Posted by kw...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/ea12b5fd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ea12b5fd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ea12b5fd

Branch: refs/heads/master
Commit: ea12b5fd225a6af32cba55e589cdca22e606fc0e
Parents: 7cadada 92f1cde
Author: Karl Wright <Da...@gmail.com>
Authored: Thu Mar 22 11:10:38 2018 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Thu Mar 22 11:10:38 2018 -0400

----------------------------------------------------------------------
 dev-tools/scripts/reproduceJenkinsFailures.py   |  17 +-
 .../test-patch/lucene-solr-yetus-personality.sh |   6 +-
 lucene/CHANGES.txt                              |   6 +
 .../analysis/shingle/FixedShingleFilter.java    | 307 ++++++++++++
 .../shingle/FixedShingleFilterFactory.java      |  52 ++
 ...ache.lucene.analysis.util.TokenFilterFactory |   1 +
 .../shingle/FixedShingleFilterTest.java         | 200 ++++++++
 .../apache/lucene/document/FeatureField.java    | 496 +++++++++++++++++++
 .../apache/lucene/document/FeatureQuery.java    | 157 ++++++
 .../lucene/index/BufferedUpdatesStream.java     |  40 +-
 .../lucene/index/ConcurrentMergeScheduler.java  |   3 +-
 .../lucene/index/DefaultIndexingChain.java      |  11 +-
 .../org/apache/lucene/index/DocConsumer.java    |   2 +-
 .../apache/lucene/index/DocumentsWriter.java    |   4 +-
 .../index/DocumentsWriterFlushControl.java      |   8 +-
 .../lucene/index/DocumentsWriterPerThread.java  |   5 +-
 .../lucene/index/FrozenBufferedUpdates.java     | 166 +++----
 .../apache/lucene/index/IndexFileDeleter.java   |  38 +-
 .../org/apache/lucene/index/IndexReader.java    |  27 +-
 .../org/apache/lucene/index/IndexWriter.java    | 140 ++----
 .../apache/lucene/index/ReadersAndUpdates.java  |   2 +-
 .../apache/lucene/index/SegmentCoreReaders.java |  28 +-
 .../apache/lucene/index/SegmentDocValues.java   |  17 +-
 .../lucene/index/SegmentDocValuesProducer.java  |  17 +-
 .../org/apache/lucene/index/SegmentReader.java  |  18 +-
 .../lucene/index/StandardDirectoryReader.java   |  86 ++--
 .../apache/lucene/index/TwoPhaseCommitTool.java |   1 +
 .../org/apache/lucene/search/LRUQueryCache.java |  49 +-
 .../java/org/apache/lucene/util/IOUtils.java    |  67 +--
 .../lucene/document/TestFeatureField.java       | 317 ++++++++++++
 .../apache/lucene/search/TestLRUQueryCache.java |  88 ++--
 .../TestUsageTrackingFilterCachingPolicy.java   |   2 +-
 .../org/apache/lucene/util/TestIOUtils.java     |  17 +
 .../analysis/BaseTokenStreamTestCase.java       |   4 +
 .../java/org/apache/lucene/analysis/Token.java  |   7 +
 .../lucene/index/OwnCacheKeyMultiReader.java    |  18 +-
 .../org/apache/lucene/util/LuceneTestCase.java  |   2 +-
 solr/CHANGES.txt                                |   5 +
 .../solr/ltr/TestLTRReRankingPipeline.java      |   2 +-
 .../java/org/apache/solr/cloud/CloudUtil.java   |  12 +
 .../cloud/LeaderInitiatedRecoveryThread.java    |  30 +-
 .../solr/cloud/RecoveringCoreTermWatcher.java   |  40 +-
 .../org/apache/solr/cloud/ZkController.java     |   2 +-
 .../solr/cloud/overseer/ReplicaMutator.java     |  13 +-
 .../facet/FacetFieldProcessorByHashDV.java      |   1 -
 .../src/java/org/apache/solr/util/TimeOut.java  |  10 +
 .../apache/solr/cloud/DeleteReplicaTest.java    |  58 ++-
 .../apache/solr/cloud/HttpPartitionTest.java    |   4 +
 .../src/common-query-parameters.adoc            |   2 +-
 .../src/implicit-requesthandlers.adoc           |   4 +-
 solr/solr-ref-guide/src/phonetic-matching.adoc  |  14 +-
 .../src/update-request-processors.adoc          |   2 +-
 .../src/zookeeper-access-control.adoc           |   4 +-
 .../apache/solr/common/cloud/ZkStateReader.java |   2 +
 54 files changed, 2050 insertions(+), 581 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ea12b5fd/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --cc lucene/CHANGES.txt
index 77508c4,c2cbc07..b0973c1
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@@ -103,12 -103,14 +103,18 @@@ New Feature
    deleted documents around for later reuse. See "IW.softUpdateDocument(...)"
    for reference. (Simon Willnauer)
  
+ * LUCENE-8197: A new FeatureField makes it easy and efficient to integrate
+   static relevance signals into the final score. (Adrien Grand, Robert Muir)
+ 
+ * LUCENE-8202: Add a FixedShingleFilter (Alan Woodward, Adrien Grand, Jim
+   Ferenczi)
+ 
  Other
  
 +* LUCENE-8219: Use a realistic estimate of the number of nodes and links in
 +   LevensteinAutomaton.java, to save reallocation of arrays.
 +   (Christian Ziech)
 +
  * LUCENE-8214: Improve selection of testPoint for GeoComplexPolygon.
    (Ignacio Vera)