lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1700800 [12/24] - in /lucene/dev/branches/lucene6699: ./ dev-tools/ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/scripts/ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/analysis/common/src/java/org/apache/lucene/analysis/ar/...
Date Wed, 02 Sep 2015 13:06:22 GMT
Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ScoreAugmenter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ScoreAugmenter.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ScoreAugmenter.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ScoreAugmenter.java Wed Sep  2 13:06:13 2015
@@ -17,7 +17,6 @@
 package org.apache.solr.response.transform;
 
 import org.apache.solr.common.SolrDocument;
-import org.apache.solr.request.SolrQueryRequest;
 
 /**
  * Simple Augmenter that adds the score
@@ -40,11 +39,9 @@ public class ScoreAugmenter extends DocT
   }
 
   @Override
-  public void transform(SolrDocument doc, int docid) {
+  public void transform(SolrDocument doc, int docid, float score) {
     if( context != null && context.wantsScores() ) {
-      if( context.getDocIterator() != null ) {
-        doc.setField( name, context.getDocIterator().score() );
-      }
+        doc.setField( name, score );
     }
   }
 }

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueAugmenterFactory.java Wed Sep  2 13:06:13 2015
@@ -96,7 +96,7 @@ class ValueAugmenter extends DocTransfor
   }
 
   @Override
-  public void transform(SolrDocument doc, int docid) {
+  public void transform(SolrDocument doc, int docid, float score) {
     doc.setField( name, value );
   }
 }

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java Wed Sep  2 13:06:13 2015
@@ -27,6 +27,7 @@ import org.apache.lucene.queries.functio
 import org.apache.lucene.queries.function.ValueSource;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.response.ResultContext;
 import org.apache.solr.search.QParser;
 import org.apache.solr.search.SolrIndexSearcher;
 
@@ -60,7 +61,8 @@ public class ValueSourceAugmenter extend
   }
 
   @Override
-  public void setContext( TransformContext context ) {
+  public void setContext( ResultContext context ) {
+    super.setContext(context);
     try {
       IndexReader reader = qparser.getReq().getSearcher().getIndexReader();
       readerContexts = reader.leaves();
@@ -82,7 +84,7 @@ public class ValueSourceAugmenter extend
 
 
   @Override
-  public void transform(SolrDocument doc, int docid) {
+  public void transform(SolrDocument doc, int docid, float score) {
     // This is only good for random-access functions
 
     try {

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java Wed Sep  2 13:06:13 2015
@@ -16,6 +16,27 @@ package org.apache.solr.schema;
  * limitations under the License.
  */
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.util.CharFilterFactory;
@@ -53,28 +74,6 @@ import org.apache.zookeeper.KeeperExcept
 import org.apache.zookeeper.data.Stat;
 import org.xml.sax.InputSource;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.StringWriter;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
 /** Solr-managed schema - non-user-editable, but can be mutable via internal and external REST API requests. */
 public final class ManagedIndexSchema extends IndexSchema {
 
@@ -269,7 +268,7 @@ public final class ManagedIndexSchema ex
       Thread.currentThread().interrupt();
     } finally {
       if (!parallelExecutor.isShutdown())
-        parallelExecutor.shutdownNow();
+        parallelExecutor.shutdown();
     }
 
     log.info("Took {}ms for {} replicas to apply schema update version {} for collection {}",

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java Wed Sep  2 13:06:13 2015
@@ -27,8 +27,8 @@ import java.util.Map;
 
 import com.carrotsearch.hppc.FloatArrayList;
 import com.carrotsearch.hppc.IntArrayList;
-import com.carrotsearch.hppc.IntIntOpenHashMap;
-import com.carrotsearch.hppc.IntLongOpenHashMap;
+import com.carrotsearch.hppc.IntIntHashMap;
+import com.carrotsearch.hppc.IntLongHashMap;
 import com.carrotsearch.hppc.cursors.IntIntCursor;
 import com.carrotsearch.hppc.cursors.IntLongCursor;
 import org.apache.lucene.index.DocValues;
@@ -228,8 +228,8 @@ public class CollapsingQParserPlugin ext
       }
     }
 
-    private IntIntOpenHashMap getBoostDocs(SolrIndexSearcher indexSearcher, Map<BytesRef, Integer> boosted, Map context) throws IOException {
-      IntIntOpenHashMap boostDocs = QueryElevationComponent.getBoostDocs(indexSearcher, boosted, context);
+    private IntIntHashMap getBoostDocs(SolrIndexSearcher indexSearcher, Map<BytesRef, Integer> boosted, Map context) throws IOException {
+      IntIntHashMap boostDocs = QueryElevationComponent.getBoostDocs(indexSearcher, boosted, context);
       return boostDocs;
     }
 
@@ -242,7 +242,7 @@ public class CollapsingQParserPlugin ext
         //We have to deal with it here rather then the constructor because
         //because the QueryElevationComponent runs after the Queries are constructed.
 
-        IntIntOpenHashMap boostDocsMap = null;
+        IntIntHashMap boostDocsMap = null;
         Map context = null;
         SolrRequestInfo info = SolrRequestInfo.getRequestInfo();
         if(info != null) {
@@ -413,7 +413,7 @@ public class CollapsingQParserPlugin ext
                              int segments,
                              SortedDocValues collapseValues,
                              int nullPolicy,
-                             IntIntOpenHashMap boostDocsMap) {
+                             IntIntHashMap boostDocsMap) {
       this.maxDoc = maxDoc;
       this.contexts = new LeafReaderContext[segments];
       this.collapsedSet = new FixedBitSet(maxDoc);
@@ -608,7 +608,7 @@ public class CollapsingQParserPlugin ext
     private LeafReaderContext[] contexts;
     private FixedBitSet collapsedSet;
     private NumericDocValues collapseValues;
-    private IntLongOpenHashMap cmap;
+    private IntLongHashMap cmap;
     private int maxDoc;
     private int nullPolicy;
     private float nullScore = -Float.MAX_VALUE;
@@ -627,7 +627,7 @@ public class CollapsingQParserPlugin ext
                              int nullPolicy,
                              int size,
                              String field,
-                             IntIntOpenHashMap boostDocsMap) {
+                             IntIntHashMap boostDocsMap) {
       this.maxDoc = maxDoc;
       this.contexts = new LeafReaderContext[segments];
       this.collapsedSet = new FixedBitSet(maxDoc);
@@ -636,7 +636,7 @@ public class CollapsingQParserPlugin ext
       if(nullPolicy == CollapsingPostFilter.NULL_POLICY_EXPAND) {
         nullScores = new FloatArrayList();
       }
-      this.cmap = new IntLongOpenHashMap(size);
+      this.cmap = new IntLongHashMap(size);
       this.field = field;
 
       if(boostDocsMap != null) {
@@ -680,18 +680,19 @@ public class CollapsingQParserPlugin ext
 
       if(collapseValue != nullValue) {
         float score = scorer.score();
-        if(cmap.containsKey(collapseValue)) {
-          long scoreDoc = cmap.lget();
+        final int idx;
+        if((idx = cmap.indexOf(collapseValue)) >= 0) {
+          long scoreDoc = cmap.indexGet(idx);
           int testScore = (int)(scoreDoc>>32);
           int currentScore = Float.floatToRawIntBits(score);
           if(currentScore > testScore) {
             //Current score is higher so replace the old scoreDoc with the current scoreDoc
-            cmap.lset((((long)currentScore)<<32)+globalDoc);
+            cmap.indexReplace(idx, (((long)currentScore)<<32)+globalDoc);
           }
         } else {
           //Combine the score and document into a long.
           long scoreDoc = (((long)Float.floatToRawIntBits(score))<<32)+globalDoc;
-          cmap.put(collapseValue, scoreDoc);
+          cmap.indexInsert(idx, collapseValue, scoreDoc);
         }
       } else if(nullPolicy == CollapsingPostFilter.NULL_POLICY_COLLAPSE) {
         float score = scorer.score();
@@ -807,7 +808,7 @@ public class CollapsingQParserPlugin ext
                                   boolean max,
                                   boolean needsScores,
                                   FieldType fieldType,
-                                  IntIntOpenHashMap boostDocs,
+                                  IntIntHashMap boostDocs,
                                   FunctionQuery funcQuery, IndexSearcher searcher) throws IOException{
 
       this.maxDoc = maxDoc;
@@ -975,7 +976,7 @@ public class CollapsingQParserPlugin ext
                                   boolean max,
                                   boolean needsScores,
                                   FieldType fieldType,
-                                  IntIntOpenHashMap boostDocsMap,
+                                  IntIntHashMap boostDocsMap,
                                   FunctionQuery funcQuery,
                                   IndexSearcher searcher) throws IOException{
 
@@ -1035,7 +1036,7 @@ public class CollapsingQParserPlugin ext
       DocIdSetIterator it = new BitSetIterator(collapseStrategy.getCollapsedSet(), 0); // cost is not useful here
       int globalDoc = -1;
       int nullScoreIndex = 0;
-      IntIntOpenHashMap cmap = collapseStrategy.getCollapseMap();
+      IntIntHashMap cmap = collapseStrategy.getCollapseMap();
       int[] docs = collapseStrategy.getDocs();
       float[] scores = collapseStrategy.getScores();
       FloatArrayList nullScores = collapseStrategy.getNullScores();
@@ -1090,7 +1091,7 @@ public class CollapsingQParserPlugin ext
                                             String hint,
                                             boolean needsScores,
                                             int size,
-                                            IntIntOpenHashMap boostDocs,
+                                            IntIntHashMap boostDocs,
                                             SolrIndexSearcher searcher) throws IOException {
 
 
@@ -1285,7 +1286,7 @@ public class CollapsingQParserPlugin ext
                                  int nullPolicy,
                                  boolean max,
                                  boolean needsScores,
-                                 IntIntOpenHashMap boostDocsMap,
+                                 IntIntHashMap boostDocsMap,
                                  SortedDocValues values) {
       this.field = field;
       this.nullPolicy = nullPolicy;
@@ -1376,7 +1377,7 @@ public class CollapsingQParserPlugin ext
                           int[] ords,
                           boolean max,
                           boolean needsScores,
-                          IntIntOpenHashMap boostDocs,
+                          IntIntHashMap boostDocs,
                           SortedDocValues values) throws IOException {
       super(maxDoc, field, nullPolicy, max, needsScores, boostDocs, values);
       this.ords = ords;
@@ -1457,7 +1458,7 @@ public class CollapsingQParserPlugin ext
                           int[] ords,
                           boolean max,
                           boolean needsScores,
-                          IntIntOpenHashMap boostDocs,
+                          IntIntHashMap boostDocs,
                           SortedDocValues values) throws IOException {
       super(maxDoc, field, nullPolicy, max, needsScores, boostDocs, values);
       this.ords = ords;
@@ -1539,7 +1540,7 @@ public class CollapsingQParserPlugin ext
                            int[] ords,
                            boolean max,
                            boolean needsScores,
-                           IntIntOpenHashMap boostDocs, SortedDocValues values) throws IOException {
+                           IntIntHashMap boostDocs, SortedDocValues values) throws IOException {
       super(maxDoc, field, nullPolicy, max, needsScores, boostDocs, values);
       this.ords = ords;
       this.ordVals = new long[ords.length];
@@ -1623,7 +1624,7 @@ public class CollapsingQParserPlugin ext
                                   int[] ords,
                                   boolean max,
                                   boolean needsScores,
-                                  IntIntOpenHashMap boostDocs,
+                                  IntIntHashMap boostDocs,
                                   FunctionQuery funcQuery,
                                   IndexSearcher searcher,
                                   SortedDocValues values) throws IOException {
@@ -1707,7 +1708,7 @@ public class CollapsingQParserPlugin ext
 
   private abstract class IntFieldValueStrategy {
     protected int nullPolicy;
-    protected IntIntOpenHashMap cmap;
+    protected IntIntHashMap cmap;
     protected Scorer scorer;
     protected FloatArrayList nullScores;
     protected float nullScore;
@@ -1736,7 +1737,7 @@ public class CollapsingQParserPlugin ext
                                  int nullPolicy,
                                  boolean max,
                                  boolean needsScores,
-                                 IntIntOpenHashMap boostDocsMap) {
+                                 IntIntHashMap boostDocsMap) {
       this.field = field;
       this.collapseField = collapseField;
       this.nullValue = nullValue;
@@ -1744,7 +1745,7 @@ public class CollapsingQParserPlugin ext
       this.max = max;
       this.needsScores = needsScores;
       this.collapsedSet = new FixedBitSet(maxDoc);
-      this.cmap = new IntIntOpenHashMap(size);
+      this.cmap = new IntIntHashMap(size);
       if(boostDocsMap != null) {
         this.boosts = true;
         this.boostDocs = new IntArrayList();
@@ -1801,7 +1802,7 @@ public class CollapsingQParserPlugin ext
       return nullScores;
     }
 
-    public IntIntOpenHashMap getCollapseMap() {
+    public IntIntHashMap getCollapseMap() {
       return cmap;
     }
 
@@ -1842,7 +1843,7 @@ public class CollapsingQParserPlugin ext
                           int nullPolicy,
                           boolean max,
                           boolean needsScores,
-                          IntIntOpenHashMap boostDocs) throws IOException {
+                          IntIntHashMap boostDocs) throws IOException {
 
       super(maxDoc, size, collapseField, field, nullValue, nullPolicy, max, needsScores, boostDocs);
 
@@ -1881,8 +1882,9 @@ public class CollapsingQParserPlugin ext
       int currentVal = (int) minMaxVals.get(contextDoc);
 
       if(collapseKey != nullValue) {
-        if(cmap.containsKey(collapseKey)) {
-          int pointer = cmap.lget();
+        final int idx;
+        if((idx = cmap.indexOf(collapseKey)) >= 0) {
+          int pointer = cmap.indexGet(idx);
           if(comp.test(currentVal, testValues[pointer])) {
             testValues[pointer]= currentVal;
             docs[pointer] = globalDoc;
@@ -1942,7 +1944,7 @@ public class CollapsingQParserPlugin ext
                           int nullPolicy,
                           boolean max,
                           boolean needsScores,
-                          IntIntOpenHashMap boostDocs) throws IOException {
+                          IntIntHashMap boostDocs) throws IOException {
 
       super(maxDoc, size, collapseField, field, nullValue, nullPolicy, max, needsScores, boostDocs);
 
@@ -1982,8 +1984,9 @@ public class CollapsingQParserPlugin ext
       float currentVal = Float.intBitsToFloat(minMaxVal);
 
       if(collapseKey != nullValue) {
-        if(cmap.containsKey(collapseKey)) {
-          int pointer = cmap.lget();
+        final int idx;
+        if((idx = cmap.indexOf(collapseKey)) >= 0) {
+          int pointer = cmap.indexGet(idx);
           if(comp.test(currentVal, testValues[pointer])) {
             testValues[pointer] = currentVal;
             docs[pointer] = globalDoc;
@@ -2054,7 +2057,7 @@ public class CollapsingQParserPlugin ext
                                   int nullPolicy,
                                   boolean max,
                                   boolean needsScores,
-                                  IntIntOpenHashMap boostDocs,
+                                  IntIntHashMap boostDocs,
                                   FunctionQuery funcQuery,
                                   IndexSearcher searcher) throws IOException {
 
@@ -2108,8 +2111,9 @@ public class CollapsingQParserPlugin ext
       float currentVal = functionValues.floatVal(contextDoc);
 
       if(collapseKey != nullValue) {
-        if(cmap.containsKey(collapseKey)) {
-          int pointer = cmap.lget();
+        final int idx;
+        if((idx = cmap.indexOf(collapseKey)) >= 0) {
+          int pointer = cmap.indexGet(idx);
           if(comp.test(currentVal, testValues[pointer])) {
             testValues[pointer] = currentVal;
             docs[pointer] = globalDoc;

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollectorException.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollectorException.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollectorException.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollectorException.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java Wed Sep  2 13:06:13 2015
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.lucene.index.Fields;
 import org.apache.lucene.index.IndexReader;
@@ -44,12 +43,7 @@ import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.FixedBitSet;
 import org.apache.lucene.util.StringHelper;
-import org.apache.solr.cloud.ZkController;
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.cloud.Aliases;
-import org.apache.solr.common.cloud.Replica;
-import org.apache.solr.common.cloud.Slice;
-import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
@@ -85,10 +79,12 @@ public class JoinQParserPlugin extends Q
       }
       
       Query parseJoin() throws SyntaxError {
-        String fromField = getParam("from");
-        String fromIndex = getParam("fromIndex");
-        String toField = getParam("to");
-        String v = localParams.get("v");
+        final String fromField = getParam("from");
+        final String fromIndex = getParam("fromIndex");
+        final String toField = getParam("to");
+        final String v = localParams.get("v");
+        final String coreName;
+
         Query fromQuery;
         long fromCoreOpenTime = 0;
 
@@ -96,42 +92,13 @@ public class JoinQParserPlugin extends Q
           CoreContainer container = req.getCore().getCoreDescriptor().getCoreContainer();
 
           // if in SolrCloud mode, fromIndex should be the name of a single-sharded collection
-          if (container.isZooKeeperAware()) {
-            ZkController zkController = container.getZkController();
-            if (!zkController.getClusterState().hasCollection(fromIndex)) {
-              // collection not found ... but it might be an alias?
-              String resolved = null;
-              Aliases aliases = zkController.getZkStateReader().getAliases();
-              if (aliases != null) {
-                Map<String, String> collectionAliases = aliases.getCollectionAliasMap();
-                resolved = (collectionAliases != null) ? collectionAliases.get(fromIndex) : null;
-                if (resolved != null) {
-                  // ok, was an alias, but if the alias points to multiple collections, then we don't support that yet
-                  if (resolved.split(",").length > 1)
-                    throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-                        "SolrCloud join: Collection alias '" + fromIndex +
-                            "' maps to multiple collections ("+resolved+
-                            "), which is not currently supported for joins.");
-                }
-              }
-
-              if (resolved == null)
-                throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-                  "SolrCloud join: Collection '" + fromIndex + "' not found!");
-
-              // ok, resolved to an alias
-              fromIndex = resolved;
-            }
-
-            // the fromIndex is a local replica for a single-sharded collection with replicas
-            // across all nodes that have replicas for the collection we're joining with
-            fromIndex = findLocalReplicaForFromIndex(zkController, fromIndex);
-          }
+          coreName = ScoreJoinQParserPlugin.getCoreName(fromIndex, container);
 
-          final SolrCore fromCore = container.getCore(fromIndex);
-          if (fromCore == null)
+          final SolrCore fromCore = container.getCore(coreName);
+          if (fromCore == null) {
             throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-                "Cross-core join: no such core " + fromIndex);
+                "Cross-core join: no such core " + coreName);
+          }
 
           RefCounted<SolrIndexSearcher> fromHolder = null;
           LocalSolrQueryRequest otherReq = new LocalSolrQueryRequest(fromCore, params);
@@ -146,48 +113,18 @@ public class JoinQParserPlugin extends Q
             if (fromHolder != null) fromHolder.decref();
           }
         } else {
+          coreName = null;
           QParser fromQueryParser = subQuery(v, null);
           fromQuery = fromQueryParser.getQuery();
         }
 
-        JoinQuery jq = new JoinQuery(fromField, toField, fromIndex, fromQuery);
+        JoinQuery jq = new JoinQuery(fromField, toField, coreName == null ? fromIndex : coreName, fromQuery);
         jq.fromCoreOpenTime = fromCoreOpenTime;
         return jq;
       }
     };
   }
 
-  protected String findLocalReplicaForFromIndex(ZkController zkController, String fromIndex) {
-    String fromReplica = null;
-
-    String nodeName = zkController.getNodeName();
-    for (Slice slice : zkController.getClusterState().getActiveSlices(fromIndex)) {
-      if (fromReplica != null)
-        throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-            "SolrCloud join: multiple shards not yet supported " + fromIndex);
-
-      for (Replica replica : slice.getReplicas()) {
-        if (replica.getNodeName().equals(nodeName)) {
-          fromReplica = replica.getStr(ZkStateReader.CORE_NAME_PROP);
-
-          // found local replica, but is it Active?
-          if (replica.getState() != Replica.State.ACTIVE)
-            throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-                "SolrCloud join: "+fromIndex+" has a local replica ("+fromReplica+
-                    ") on "+nodeName+", but it is "+replica.getState());
-
-          break;
-        }
-      }
-    }
-
-    if (fromReplica == null)
-      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
-          "SolrCloud join: No active replicas for "+fromIndex+
-              " found in node " + nodeName);
-
-    return fromReplica;
-  }
 }
 
 

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java Wed Sep  2 13:06:13 2015
@@ -23,8 +23,9 @@ import java.util.Comparator;
 import java.util.Map;
 import java.util.Set;
 
-import com.carrotsearch.hppc.IntFloatOpenHashMap;
-import com.carrotsearch.hppc.IntIntOpenHashMap;
+import com.carrotsearch.hppc.IntFloatHashMap;
+import com.carrotsearch.hppc.IntIntHashMap;
+
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.Term;
@@ -42,7 +43,6 @@ import org.apache.lucene.search.TopDocsC
 import org.apache.lucene.search.TopFieldCollector;
 import org.apache.lucene.search.TopScoreDocCollector;
 import org.apache.lucene.search.Weight;
-import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CommonParams;
@@ -157,7 +157,7 @@ public class ReRankQParserPlugin extends
       return "{!rerank mainQuery='"+mainQuery.toString()+
              "' reRankQuery='"+reRankQuery.toString()+
              "' reRankDocs="+reRankDocs+
-             " reRankWeigh="+reRankWeight+"}";
+             " reRankWeight="+reRankWeight+"}";
     }
 
     public Query rewrite(IndexReader reader) throws IOException {
@@ -292,7 +292,7 @@ public class ReRankQParserPlugin extends
             requestContext = info.getReq().getContext();
           }
 
-          IntIntOpenHashMap boostedDocs = QueryElevationComponent.getBoostDocs((SolrIndexSearcher)searcher, boostedPriority, requestContext);
+          IntIntHashMap boostedDocs = QueryElevationComponent.getBoostDocs((SolrIndexSearcher)searcher, boostedPriority, requestContext);
 
           ScoreDoc[] mainScoreDocs = mainDocs.scoreDocs;
           ScoreDoc[] reRankScoreDocs = new ScoreDoc[Math.min(mainScoreDocs.length, reRankDocs)];
@@ -391,14 +391,15 @@ public class ReRankQParserPlugin extends
   }
 
   public class BoostedComp implements Comparator {
-    IntFloatOpenHashMap boostedMap;
+    IntFloatHashMap boostedMap;
 
-    public BoostedComp(IntIntOpenHashMap boostedDocs, ScoreDoc[] scoreDocs, float maxScore) {
-      this.boostedMap = new IntFloatOpenHashMap(boostedDocs.size()*2);
+    public BoostedComp(IntIntHashMap boostedDocs, ScoreDoc[] scoreDocs, float maxScore) {
+      this.boostedMap = new IntFloatHashMap(boostedDocs.size()*2);
 
       for(int i=0; i<scoreDocs.length; i++) {
-        if(boostedDocs.containsKey(scoreDocs[i].doc)) {
-          boostedMap.put(scoreDocs[i].doc, maxScore+boostedDocs.lget());
+        final int idx;
+        if((idx = boostedDocs.indexOf(scoreDocs[i].doc)) >= 0) {
+          boostedMap.put(scoreDocs[i].doc, maxScore+boostedDocs.indexGet(idx));
         } else {
           break;
         }
@@ -410,21 +411,16 @@ public class ReRankQParserPlugin extends
       ScoreDoc doc2 = (ScoreDoc) o2;
       float score1 = doc1.score;
       float score2 = doc2.score;
-      if(boostedMap.containsKey(doc1.doc)) {
-        score1 = boostedMap.lget();
+      int idx;
+      if((idx = boostedMap.indexOf(doc1.doc)) >= 0) {
+        score1 = boostedMap.indexGet(idx);
       }
 
-      if(boostedMap.containsKey(doc2.doc)) {
-        score2 = boostedMap.lget();
+      if((idx = boostedMap.indexOf(doc2.doc)) >= 0) {
+        score2 = boostedMap.indexGet(idx);
       }
 
-      if(score1 > score2) {
-        return -1;
-      } else if(score1 < score2) {
-        return 1;
-      } else {
-        return 0;
-      }
+      return -Float.compare(score1, score2);
     }
   }
 }
\ No newline at end of file

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java Wed Sep  2 13:06:13 2015
@@ -107,7 +107,7 @@ public class SolrIndexSearcher extends I
   public static final AtomicLong numCloses = new AtomicLong();
 
 
-  private static Logger log = LoggerFactory.getLogger(SolrIndexSearcher.class);
+  static Logger log = LoggerFactory.getLogger(SolrIndexSearcher.class);
   private final SolrCore core;
   private final IndexSchema schema;
 
@@ -1259,21 +1259,7 @@ public class SolrIndexSearcher extends I
 
   // query must be positive
   protected DocSet getDocSetNC(Query query, DocSet filter) throws IOException {
-    DocSetCollector collector = new DocSetCollector(maxDoc()>>6, maxDoc());
-
-    try {
-      if (filter != null) {
-        Filter luceneFilter = filter.getTopFilter();
-        query = new BooleanQuery.Builder()
-            .add(query, Occur.MUST)
-            .add(luceneFilter, Occur.FILTER)
-            .build();
-      }
-      super.search(query, collector);
-    } catch ( ExitableDirectoryReader.ExitingReaderException e) {
-        log.warn("Query: " + query + "; " + e.getMessage());
-    }
-    return collector.getDocSet();
+    return DocSetUtil.createDocSet(this, query, filter);
   }
 
 
@@ -2649,3 +2635,4 @@ class FilterImpl extends Filter {
   }
 
 }
+

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrQueryTimeoutImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrQueryTimeoutImpl.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrQueryTimeoutImpl.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/SolrQueryTimeoutImpl.java Wed Sep  2 13:06:13 2015
@@ -49,6 +49,11 @@ public class SolrQueryTimeoutImpl implem
     return timeoutAt.get();
   }
 
+  @Override
+  public boolean isTimeoutEnabled() {
+    return get() != null;
+  }
+
   /**
    * Return true if a timeoutAt value is set and the current time has exceeded the set timeOut.
    */

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorNumeric.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorNumeric.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorNumeric.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorNumeric.java Wed Sep  2 13:06:13 2015
@@ -317,7 +317,7 @@ class FacetFieldProcessorNumeric extends
 
       int segDoc = doc - segBase;
       long val = values.get(segDoc);
-      if (val != 0 && docsWithField.get(segDoc)) {
+      if (val != 0 || docsWithField.get(segDoc)) {
         int slot = table.add(val);  // this can trigger a rehash rehash
 
         // countAcc.incrementCount(slot, 1);

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/SearchGroupsFieldCommand.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/SearchGroupsFieldCommand.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/SearchGroupsFieldCommand.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/SearchGroupsFieldCommand.java Wed Sep  2 13:06:13 2015
@@ -38,7 +38,7 @@ import java.util.*;
 /**
  * Creates all the collectors needed for the first phase and how to handle the results.
  */
-public class SearchGroupsFieldCommand implements Command<Pair<Integer, Collection<SearchGroup<BytesRef>>>> {
+public class SearchGroupsFieldCommand implements Command<SearchGroupsFieldCommandResult> {
 
   public static class Builder {
 
@@ -118,7 +118,7 @@ public class SearchGroupsFieldCommand im
   }
 
   @Override
-  public Pair<Integer, Collection<SearchGroup<BytesRef>>> result() {
+  public SearchGroupsFieldCommandResult result() {
     final Collection<SearchGroup<BytesRef>> topGroups;
     if (topNGroups > 0) {
       if (field.getType().getNumericType() != null) {
@@ -135,7 +135,7 @@ public class SearchGroupsFieldCommand im
     } else {
       groupCount = null;
     }
-    return new Pair<>(groupCount, topGroups);
+    return new SearchGroupsFieldCommandResult(groupCount, topGroups);
   }
 
   @Override

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/SearchGroupShardResponseProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/SearchGroupShardResponseProcessor.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/SearchGroupShardResponseProcessor.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/SearchGroupShardResponseProcessor.java Wed Sep  2 13:06:13 2015
@@ -30,7 +30,7 @@ import org.apache.solr.handler.component
 import org.apache.solr.handler.component.ShardResponse;
 import org.apache.solr.search.SortSpec;
 import org.apache.solr.search.grouping.distributed.ShardResponseProcessor;
-import org.apache.solr.search.grouping.distributed.command.Pair;
+import org.apache.solr.search.grouping.distributed.command.SearchGroupsFieldCommandResult;
 import org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer;
 
 import java.io.IOException;
@@ -106,17 +106,18 @@ public class SearchGroupShardResponsePro
         maxElapsedTime = (int) Math.max(maxElapsedTime, srsp.getSolrResponse().getElapsedTime());
         @SuppressWarnings("unchecked")
         NamedList<NamedList> firstPhaseResult = (NamedList<NamedList>) srsp.getSolrResponse().getResponse().get("firstPhase");
-        Map<String, Pair<Integer, Collection<SearchGroup<BytesRef>>>> result = serializer.transformToNative(firstPhaseResult, groupSort, null, srsp.getShard());
+        final Map<String, SearchGroupsFieldCommandResult> result = serializer.transformToNative(firstPhaseResult, groupSort, null, srsp.getShard());
         for (String field : commandSearchGroups.keySet()) {
-          Pair<Integer, Collection<SearchGroup<BytesRef>>> firstPhaseCommandResult = result.get(field);
-          Integer groupCount = firstPhaseCommandResult.getA();
+          final SearchGroupsFieldCommandResult firstPhaseCommandResult = result.get(field);
+
+          final Integer groupCount = firstPhaseCommandResult.getGroupCount();
           if (groupCount != null) {
             Integer existingGroupCount = rb.mergedGroupCounts.get(field);
             // Assuming groups don't cross shard boundary...
             rb.mergedGroupCounts.put(field, existingGroupCount != null ? existingGroupCount + groupCount : groupCount);
           }
 
-          Collection<SearchGroup<BytesRef>> searchGroups = firstPhaseCommandResult.getB();
+          final Collection<SearchGroup<BytesRef>> searchGroups = firstPhaseCommandResult.getSearchGroups();
           if (searchGroups == null) {
             continue;
           }

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java Wed Sep  2 13:06:13 2015
@@ -27,8 +27,8 @@ import org.apache.solr.schema.FieldType;
 import org.apache.solr.schema.SchemaField;
 import org.apache.solr.search.SolrIndexSearcher;
 import org.apache.solr.search.grouping.Command;
-import org.apache.solr.search.grouping.distributed.command.Pair;
 import org.apache.solr.search.grouping.distributed.command.SearchGroupsFieldCommand;
+import org.apache.solr.search.grouping.distributed.command.SearchGroupsFieldCommandResult;
 
 import java.io.IOException;
 import java.util.*;
@@ -36,7 +36,7 @@ import java.util.*;
 /**
  * Implementation for transforming {@link SearchGroup} into a {@link NamedList} structure and visa versa.
  */
-public class SearchGroupsResultTransformer implements ShardResultTransformer<List<Command>, Map<String, Pair<Integer, Collection<SearchGroup<BytesRef>>>>> {
+public class SearchGroupsResultTransformer implements ShardResultTransformer<List<Command>, Map<String, SearchGroupsFieldCommandResult>> {
 
   private final SolrIndexSearcher searcher;
 
@@ -54,12 +54,12 @@ public class SearchGroupsResultTransform
       final NamedList<Object> commandResult = new NamedList<>();
       if (SearchGroupsFieldCommand.class.isInstance(command)) {
         SearchGroupsFieldCommand fieldCommand = (SearchGroupsFieldCommand) command;
-        Pair<Integer, Collection<SearchGroup<BytesRef>>> pair = fieldCommand.result();
-        Integer groupedCount = pair.getA();
-        Collection<SearchGroup<BytesRef>> searchGroups = pair.getB();
+        final SearchGroupsFieldCommandResult fieldCommandResult = fieldCommand.result();
+        final Collection<SearchGroup<BytesRef>> searchGroups = fieldCommandResult.getSearchGroups();
         if (searchGroups != null) {
           commandResult.add("topGroups", serializeSearchGroup(searchGroups, fieldCommand.getGroupSort()));
         }
+        final Integer groupedCount = fieldCommandResult.getGroupCount();
         if (groupedCount != null) {
           commandResult.add("groupCount", groupedCount);
         }
@@ -76,8 +76,8 @@ public class SearchGroupsResultTransform
    * {@inheritDoc}
    */
   @Override
-  public Map<String, Pair<Integer, Collection<SearchGroup<BytesRef>>>> transformToNative(NamedList<NamedList> shardResponse, Sort groupSort, Sort sortWithinGroup, String shard) {
-    Map<String, Pair<Integer, Collection<SearchGroup<BytesRef>>>> result = new HashMap<>();
+  public Map<String, SearchGroupsFieldCommandResult> transformToNative(NamedList<NamedList> shardResponse, Sort groupSort, Sort sortWithinGroup, String shard) {
+    final Map<String, SearchGroupsFieldCommandResult> result = new HashMap<>();
     for (Map.Entry<String, NamedList> command : shardResponse) {
       List<SearchGroup<BytesRef>> searchGroups = new ArrayList<>();
       NamedList topGroupsAndGroupCount = command.getValue();
@@ -102,7 +102,7 @@ public class SearchGroupsResultTransform
       }
 
       Integer groupCount = (Integer) topGroupsAndGroupCount.get("groupCount");
-      result.put(command.getKey(), new Pair<Integer, Collection<SearchGroup<BytesRef>>>(groupCount, searchGroups));
+      result.put(command.getKey(), new SearchGroupsFieldCommandResult(groupCount, searchGroups));
     }
     return result;
   }

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java Wed Sep  2 13:06:13 2015
@@ -18,6 +18,7 @@
 package org.apache.solr.search.join;
 
 import java.io.IOException;
+import java.util.Map;
 
 import org.apache.lucene.index.DocValuesType;
 import org.apache.lucene.index.IndexReader;
@@ -25,7 +26,12 @@ import org.apache.lucene.search.Query;
 import org.apache.lucene.search.join.JoinUtil;
 import org.apache.lucene.search.join.ScoreMode;
 import org.apache.lucene.uninverting.UninvertingReader;
+import org.apache.solr.cloud.ZkController;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.cloud.Aliases;
+import org.apache.solr.common.cloud.Replica;
+import org.apache.solr.common.cloud.Slice;
+import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
@@ -59,10 +65,9 @@ import org.apache.solr.util.RefCounted;
  *             Thus, it only supports {@link DocValuesType#SORTED}, {@link DocValuesType#SORTED_SET}, {@link DocValuesType#BINARY}.  </li>
  *  <li>fromIndex - optional parameter, a core name where subordinate query should run (and <code>from</code> values are collected) rather than current core.
  *             <br>Example:<code>q={!join from=manu_id_s to=id score=total fromIndex=products}foo</code> 
- *             <br>Follow up <a href="https://issues.apache.org/jira/browse/SOLR-7775">SOLR-7775</a> for SolrCloud collections support.</li>
  *  <li>to - "primary key" field name which is searched for values collected from subordinate query. 
  *             it should be declared as <code>indexed="true"</code>. Now it's treated as a single value field.</li>
- *  <li>score - one of {@link ScoreMode}: None,Avg,Total,Max. Lowercase is also accepted.</li>
+ *  <li>score - one of {@link ScoreMode}: <code>none,avg,total,max,min</code>. Capital case is also accepted.</li>
  * </ul>
  */
 public class ScoreJoinQParserPlugin extends QParserPlugin {
@@ -235,11 +240,12 @@ public class ScoreJoinQParserPlugin exte
         if (fromIndex != null && (!fromIndex.equals(myCore) || byPassShortCircutCheck)) {
           CoreContainer container = req.getCore().getCoreDescriptor().getCoreContainer();
 
-          final SolrCore fromCore = container.getCore(fromIndex);
+          final String coreName = getCoreName(fromIndex, container);
+          final SolrCore fromCore = container.getCore(coreName);
           RefCounted<SolrIndexSearcher> fromHolder = null;
 
           if (fromCore == null) {
-            throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Cross-core join: no such core " + fromIndex);
+            throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Cross-core join: no such core " + coreName);
           }
 
           long fromCoreOpenTime = 0;
@@ -253,7 +259,7 @@ public class ScoreJoinQParserPlugin exte
             if (fromHolder != null) {
               fromCoreOpenTime = fromHolder.get().getOpenNanoTime();
             }
-            return new OtherCoreJoinQuery(fromQuery, fromField, fromIndex, fromCoreOpenTime,
+            return new OtherCoreJoinQuery(fromQuery, fromField, coreName, fromCoreOpenTime,
                 scoreMode, toField);
           } finally {
             otherReq.close();
@@ -268,6 +274,84 @@ public class ScoreJoinQParserPlugin exte
       }
     };
   }
+
+  /**
+   * Returns an String with the name of a core.
+   * <p>
+   * This method searches the core with fromIndex name in the core's container.
+   * If fromIndex isn't name of collection or alias it's returns fromIndex without changes.
+   * If fromIndex is name of alias but if the alias points to multiple collections it's throw
+   * SolrException.ErrorCode.BAD_REQUEST because multiple shards not yet supported.
+   *
+   * @param  fromIndex name of the index
+   * @param  container the core container for searching the core with fromIndex name or alias
+   * @return      the string with name of core
+   */
+  public static String getCoreName(final String fromIndex, CoreContainer container) {
+    if (container.isZooKeeperAware()) {
+      ZkController zkController = container.getZkController();
+      final String resolved =
+        zkController.getClusterState().hasCollection(fromIndex)
+          ? fromIndex : resolveAlias(fromIndex, zkController);
+      if (resolved == null) {
+        throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
+            "SolrCloud join: Collection '" + fromIndex + "' not found!");
+      }
+      return findLocalReplicaForFromIndex(zkController, resolved);
+    }
+    return fromIndex;
+  }
+
+  private static String resolveAlias(String fromIndex, ZkController zkController) {
+    final Aliases aliases = zkController.getZkStateReader().getAliases();
+    if (aliases != null) {
+      final String resolved;
+      Map<String, String> collectionAliases = aliases.getCollectionAliasMap();
+      resolved = (collectionAliases != null) ? collectionAliases.get(fromIndex) : null;
+      if (resolved != null) {
+        if (resolved.split(",").length > 1) {
+          throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
+              "SolrCloud join: Collection alias '" + fromIndex +
+                  "' maps to multiple collections (" + resolved +
+                  "), which is not currently supported for joins.");
+        }
+        return resolved;
+      }
+    }
+    return null;
+  }
+
+  private static String findLocalReplicaForFromIndex(ZkController zkController, String fromIndex) {
+    String fromReplica = null;
+
+    String nodeName = zkController.getNodeName();
+    for (Slice slice : zkController.getClusterState().getActiveSlices(fromIndex)) {
+      if (fromReplica != null)
+        throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
+            "SolrCloud join: multiple shards not yet supported " + fromIndex);
+
+      for (Replica replica : slice.getReplicas()) {
+        if (replica.getNodeName().equals(nodeName)) {
+          fromReplica = replica.getStr(ZkStateReader.CORE_NAME_PROP);
+          // found local replica, but is it Active?
+          if (replica.getState() != Replica.State.ACTIVE)
+            throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
+                "SolrCloud join: "+fromIndex+" has a local replica ("+fromReplica+
+                    ") on "+nodeName+", but it is "+replica.getState());
+
+          break;
+        }
+      }
+    }
+
+    if (fromReplica == null)
+      throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
+          "SolrCloud join: No active replicas for "+fromIndex+
+              " found in node " + nodeName);
+
+    return fromReplica;
+  }
 }
 
 
+

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsCache.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsCache.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsCache.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsSource.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsSource.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/LocalStatsSource.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsCache.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsCache.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsCache.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsSource.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsSource.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsSource.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/StatsUtil.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/TermStats.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/TermStats.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/TermStats.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/search/stats/TermStats.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.search.stats;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java Wed Sep  2 13:06:13 2015
@@ -88,7 +88,7 @@ public class RuleBasedAuthorizationPlugi
   @Override
   public AuthorizationResponse authorize(AuthorizationContext context) {
     List<AuthorizationContext.CollectionRequest> collectionRequests = context.getCollectionRequests();
-    if (collectionRequests.isEmpty()) {
+    if (context.getRequestType() == AuthorizationContext.RequestType.ADMIN) {
       MatchStatus flag = checkCollPerm(mapping.get(""), context);
       return flag.rsp;
     }

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/servlet/LoadAdminUiServlet.java Wed Sep  2 13:06:13 2015
@@ -20,6 +20,7 @@ package org.apache.solr.servlet;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.SolrCore;
 
@@ -42,9 +43,11 @@ public final class LoadAdminUiServlet ex
   public void doGet(HttpServletRequest request,
                     HttpServletResponse response)
       throws IOException {
+
+    response.addHeader("X-Frame-Options", "DENY"); // security: SOLR-7966 - avoid clickjacking for admin interface
+
     // This attribute is set by the SolrDispatchFilter
     CoreContainer cores = (CoreContainer) request.getAttribute("org.apache.solr.CoreContainer");
-
     InputStream in = getServletContext().getResourceAsStream("/admin.html");
     if(in != null && cores != null) {
       try {
@@ -62,7 +65,7 @@ public final class LoadAdminUiServlet ex
         };
         String[] replace = new String[] {
             StringEscapeUtils.escapeJavaScript(request.getContextPath()),
-            StringEscapeUtils.escapeJavaScript(CoreContainer.CORES_HANDLER_PATH),
+            StringEscapeUtils.escapeJavaScript(CommonParams.CORES_HANDLER_PATH),
             StringEscapeUtils.escapeJavaScript(pack.getSpecificationVersion())
         };
         

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/store/blockcache/CachedIndexOutput.java Wed Sep  2 13:06:13 2015
@@ -1,6 +1,6 @@
 package org.apache.solr.store.blockcache;
 
-/**
+/*
  * 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.

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/CommitTracker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/CommitTracker.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/CommitTracker.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/CommitTracker.java Wed Sep  2 13:06:13 2015
@@ -89,10 +89,10 @@ public final class CommitTracker impleme
   
   public synchronized void close() {
     if (pending != null) {
-      pending.cancel(true);
+      pending.cancel(false);
       pending = null;
     }
-    scheduler.shutdownNow();
+    scheduler.shutdown();
   }
   
   /** schedule individual commits */

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/UpdateLog.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/UpdateLog.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/UpdateLog.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/UpdateLog.java Wed Sep  2 13:06:13 2015
@@ -906,7 +906,7 @@ public class UpdateLog implements Plugin
       }
 
       try {
-        ExecutorUtil.shutdownNowAndAwaitTermination(recoveryExecutor);
+        ExecutorUtil.shutdownAndAwaitTermination(recoveryExecutor);
       } catch (Exception e) {
         SolrException.log(log, e);
       }

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java Wed Sep  2 13:06:13 2015
@@ -21,8 +21,8 @@ import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.CharsRefBuilder;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.cloud.CloudDescriptor;
-import org.apache.solr.cloud.DistributedQueue;
 import org.apache.solr.cloud.LeaderInitiatedRecoveryThread;
+import org.apache.solr.cloud.DistributedQueue;
 import org.apache.solr.cloud.Overseer;
 import org.apache.solr.cloud.ZkController;
 import org.apache.solr.cloud.overseer.OverseerAction;
@@ -1640,7 +1640,7 @@ public class DistributedUpdateProcessor
       if (ulog == null || ulog.getState() == UpdateLog.State.ACTIVE || (cmd.getFlags() & UpdateCommand.REPLAY) != 0) {
         super.processCommit(cmd);
       } else {
-        log.info("Ignoring commit while not ACTIVE - state: " + ulog.getState() + " replay:" + (cmd.getFlags() & UpdateCommand.REPLAY));
+        log.info("Ignoring commit while not ACTIVE - state: " + ulog.getState() + " replay: " + ((cmd.getFlags() & UpdateCommand.REPLAY) != 0));
       }
 
     } finally {

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java Wed Sep  2 13:06:13 2015
@@ -23,6 +23,7 @@ import org.apache.solr.common.SolrExcept
 
 import static org.apache.solr.common.SolrException.ErrorCode.*;
 
+import org.apache.solr.common.util.ExecutorUtil;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.cloud.Replica;
@@ -266,11 +267,11 @@ public final class DocExpirationUpdatePr
 
     core.addCloseHook(new CloseHook() {
       public void postClose(SolrCore core) {
-        // update handler is gone, hard terminiate anything that's left.
+        // update handler is gone, terminate anything that's left.
 
         if (executor.isTerminating()) {
-          log.info("Triggering hard close of DocExpiration Executor");
-          executor.shutdownNow();
+          log.info("Waiting for close of DocExpiration Executor");
+          ExecutorUtil.shutdownAndAwaitTermination(executor);
         }
       }
       public void preClose(SolrCore core) {

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SimplePostTool.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SimplePostTool.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SimplePostTool.java Wed Sep  2 13:06:13 2015
@@ -1093,7 +1093,7 @@ public class SimplePostTool {
           // Raw content type of form "text/html; encoding=utf-8"
           String rawContentType = conn.getContentType();
           String type = rawContentType.split(";")[0];
-          if(typeSupported(type)) {
+          if(typeSupported(type) || "*".equals(fileTypes)) {
             String encoding = conn.getContentEncoding();
             InputStream is;
             if (encoding != null && encoding.equalsIgnoreCase("gzip")) {

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SolrCLI.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SolrCLI.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SolrCLI.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/SolrCLI.java Wed Sep  2 13:06:13 2015
@@ -70,6 +70,7 @@ import org.apache.http.client.utils.URIB
 import org.apache.http.conn.ConnectTimeoutException;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.util.EntityUtils;
+import org.apache.lucene.util.Version;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -225,6 +226,12 @@ public class SolrCLI {
       exit(1);
     }
 
+    if (args.length == 1 && Arrays.asList("-v","-version","version").contains(args[0])) {
+      // Simple version tool, no need for its own class
+      System.out.println(Version.LATEST);
+      exit(0);
+    }
+
     String configurerClassName = System.getProperty("solr.authentication.httpclient.configurer");
     if (configurerClassName!=null) {
       try {
@@ -1446,13 +1453,7 @@ public class SolrCLI {
       try {
         json = getJson(createCollectionUrl);
       } catch (SolrServerException sse) {
-        // check if already exists
-        if (safeCheckCollectionExists(collectionListUrl, collectionName)) {
-          throw new IllegalArgumentException("Collection '"+collectionName+
-              "' already exists!\nChecked collection existence using Collections API command:\n"+collectionListUrl);
-        } else {
-          throw new Exception("Failed to create collection '"+collectionName+"' due to: "+sse.getMessage());
-        }
+        throw new Exception("Failed to create collection '"+collectionName+"' due to: "+sse.getMessage());
       }
 
       CharArr arr = new CharArr();
@@ -1584,18 +1585,7 @@ public class SolrCLI {
 
       echo("\nCreating new core '" + coreName + "' using command:\n" + createCoreUrl + "\n");
 
-      Map<String,Object> json = null;
-      try {
-        json = getJson(createCoreUrl);
-      } catch (SolrServerException sse) {
-        // mostly likely the core already exists ...
-        if (safeCheckCoreExists(coreStatusUrl, coreName)) {
-          // core already exists
-          throw new IllegalArgumentException("Core '"+coreName+"' already exists!\nChecked core existence using Core API command:\n"+coreStatusUrl);
-        } else {
-          throw sse;
-        }
-      }
+      Map<String,Object> json = getJson(createCoreUrl);
 
       CharArr arr = new CharArr();
       new JSONWriter(arr, 2).write(json);
@@ -2150,25 +2140,16 @@ public class SolrCLI {
         }
 
         if (exampledocsDir.isDirectory()) {
-          File postJarFile = new File(exampledocsDir, "post.jar");
           String updateUrl = String.format(Locale.ROOT, "%s/%s/update", solrUrl, collectionName);
           echo("Indexing tech product example docs from "+exampledocsDir.getAbsolutePath());
-          if (postJarFile.isFile()) {
-            String javaHome = System.getProperty("java.home");
-            String java = javaHome+"/bin/java";
-            String postCmd = String.format(Locale.ROOT, "%s -Durl=\"%s\" -jar %s \"%s\"/*.xml",
-                java, updateUrl, postJarFile.getAbsolutePath(), exampledocsDir.getAbsolutePath());
-            executor.execute(org.apache.commons.exec.CommandLine.parse(postCmd));
+
+          String currentPropVal = System.getProperty("url");
+          System.setProperty("url", updateUrl);
+          SimplePostTool.main(new String[] {exampledocsDir.getAbsolutePath()+"/*.xml"});
+          if (currentPropVal != null) {
+            System.setProperty("url", currentPropVal); // reset
           } else {
-            // a bit hacky, but just use SimplePostTool directly
-            String currentPropVal = System.getProperty("url");
-            System.setProperty("url", updateUrl);
-            SimplePostTool.main(new String[] {exampledocsDir.getAbsolutePath()+"/*.xml"});
-            if (currentPropVal != null) {
-              System.setProperty("url", currentPropVal); // reset
-            } else {
-              System.clearProperty("url");
-            }
+            System.clearProperty("url");
           }
         } else {
           echo("exampledocs directory not found, skipping indexing step for the techproducts example");

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordDeserializer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordDeserializer.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordDeserializer.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordDeserializer.java Wed Sep  2 13:06:13 2015
@@ -99,7 +99,7 @@ class BigEndianAscendingWordDeserializer
         }
 
         // First bit of the word
-        final long firstBitIndex = (position * wordLength);
+        final long firstBitIndex = ((long)position) * ((long)wordLength);
         final int firstByteIndex = (bytePadding + (int)(firstBitIndex / BITS_PER_BYTE));
         final int firstByteSkipBits = (int)(firstBitIndex % BITS_PER_BYTE);
 

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordSerializer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordSerializer.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordSerializer.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/BigEndianAscendingWordSerializer.java Wed Sep  2 13:06:13 2015
@@ -85,7 +85,7 @@ class BigEndianAscendingWordSerializer i
         this.wordLength = wordLength;
         this.wordCount = wordCount;
 
-        final long bitsRequired = (wordLength * wordCount);
+        final long bitsRequired = ((long)wordLength) * ((long)wordCount);
         final boolean leftoverBits = ((bitsRequired % BITS_PER_BYTE) != 0);
         final int bytesRequired = (int)(bitsRequired / BITS_PER_BYTE) + (leftoverBits ? 1 : 0) + bytePadding;
         bytes = new byte[bytesRequired];

Modified: lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/HLL.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/HLL.java?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/HLL.java (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/java/org/apache/solr/util/hll/HLL.java Wed Sep  2 13:06:13 2015
@@ -19,8 +19,8 @@ package org.apache.solr.util.hll;
 
 import java.util.Arrays;
 
-import com.carrotsearch.hppc.IntByteOpenHashMap;
-import com.carrotsearch.hppc.LongOpenHashSet;
+import com.carrotsearch.hppc.IntByteHashMap;
+import com.carrotsearch.hppc.LongHashSet;
 import com.carrotsearch.hppc.cursors.IntByteCursor;
 import com.carrotsearch.hppc.cursors.LongCursor;
 
@@ -69,9 +69,9 @@ public class HLL implements Cloneable {
     // ************************************************************************
     // Storage
     // storage used when #type is EXPLICIT, null otherwise
-    LongOpenHashSet explicitStorage;
+    LongHashSet explicitStorage;
     // storage used when #type is SPARSE, null otherwise
-    IntByteOpenHashMap sparseProbabilisticStorage;
+    IntByteHashMap sparseProbabilisticStorage;
     // storage used when #type is FULL, null otherwise
     BitVector probabilisticStorage;
 
@@ -398,8 +398,9 @@ public class HLL implements Cloneable {
         final int j = (int)(rawValue & mBitsMask);
 
         final byte currentValue;
-        if (sparseProbabilisticStorage.containsKey(j)) {
-          currentValue = sparseProbabilisticStorage.lget();
+        final int index = sparseProbabilisticStorage.indexOf(j);
+        if (index >= 0) {
+          currentValue = sparseProbabilisticStorage.indexGet(index);
         } else {
           currentValue = 0;
         }
@@ -467,10 +468,10 @@ public class HLL implements Cloneable {
                 // nothing to be done
                 break;
             case EXPLICIT:
-                this.explicitStorage = new LongOpenHashSet();
+                this.explicitStorage = new LongHashSet();
                 break;
             case SPARSE:
-                this.sparseProbabilisticStorage = new IntByteOpenHashMap();
+                this.sparseProbabilisticStorage = new IntByteHashMap();
                 break;
             case FULL:
                 this.probabilisticStorage = new BitVector(regwidth, m);
@@ -522,7 +523,7 @@ public class HLL implements Cloneable {
         for(int j=0; j<m; j++) {
             final long register;
             if (sparseProbabilisticStorage.containsKey(j)) {
-              register = sparseProbabilisticStorage.lget();
+              register = sparseProbabilisticStorage.get(j);
             } else {
               register = 0;
             }

Modified: lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-HighlighterMaxOffsetTest.xml Wed Sep  2 13:06:13 2015
@@ -50,7 +50,7 @@ Test for HighlighterMaxOffsetTest which
 
 
     <!-- Just like text_general except it reverses the characters of
-	 each token, to enable more efficient leading wildcard queries. -->
+   each token, to enable more efficient leading wildcard queries. -->
     <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
       <analyzer type="index">
         <tokenizer class="solr.StandardTokenizerFactory"/>

Modified: lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-phrasesuggest.xml Wed Sep  2 13:06:13 2015
@@ -31,23 +31,23 @@
     </fieldType>
     
     <fieldType name="phrase_suggest" class="solr.TextField">
-	  <analyzer>
-	    <tokenizer class="solr.KeywordTokenizerFactory"/>
-	    <filter class="solr.PatternReplaceFilterFactory"
-	            pattern="([^\p{L}\p{M}\p{N}\p{Cs}]*[\p{L}\p{M}\p{N}\p{Cs}\_]+:)|([^\p{L}\p{M}\p{N}\p{Cs}])+"
-	            replacement=" " replace="all"/>
-	    <filter class="solr.LowerCaseFilterFactory"/>
-	    <filter class="solr.TrimFilterFactory"/>
-	  </analyzer>
-	</fieldType>
-	
-	<fieldType name="ja_suggest" class="solr.TextField">
-	  <analyzer>
-	    <tokenizer class="solr.JapaneseTokenizerFactory" mode="normal"/>
-	    <filter class="solr.CJKWidthFilterFactory"/>
-	    <filter class="solr.JapaneseReadingFormFilterFactory" useRomaji="true"/>
-	  </analyzer>
-	</fieldType>
+    <analyzer>
+      <tokenizer class="solr.KeywordTokenizerFactory"/>
+      <filter class="solr.PatternReplaceFilterFactory"
+              pattern="([^\p{L}\p{M}\p{N}\p{Cs}]*[\p{L}\p{M}\p{N}\p{Cs}\_]+:)|([^\p{L}\p{M}\p{N}\p{Cs}])+"
+              replacement=" " replace="all"/>
+      <filter class="solr.LowerCaseFilterFactory"/>
+      <filter class="solr.TrimFilterFactory"/>
+    </analyzer>
+  </fieldType>
+  
+  <fieldType name="ja_suggest" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.JapaneseTokenizerFactory" mode="normal"/>
+      <filter class="solr.CJKWidthFilterFactory"/>
+      <filter class="solr.JapaneseReadingFormFilterFactory" useRomaji="true"/>
+    </analyzer>
+  </fieldType>
   </types>
 
   <fields>

Modified: lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-spellchecker.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-spellchecker.xml?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-spellchecker.xml (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema-spellchecker.xml Wed Sep  2 13:06:13 2015
@@ -46,22 +46,22 @@
       </analyzer>
     </fieldType>
 
-	<fieldType name="spellText" class="solr.TextField" positionIncrementGap="100">
-	  <analyzer type="index">
-	    <tokenizer class="solr.StandardTokenizerFactory"/>
-	    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
-	    <filter class="solr.StandardFilterFactory"/>
-	    <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
-	  </analyzer>
-	  <analyzer type="query">
-	    <tokenizer class="solr.StandardTokenizerFactory"/>
-	    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
-	    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
-	    <filter class="solr.StandardFilterFactory"/>
-	    <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
-	  </analyzer>
-	</fieldType>
-	
+  <fieldType name="spellText" class="solr.TextField" positionIncrementGap="100">
+    <analyzer type="index">
+      <tokenizer class="solr.StandardTokenizerFactory"/>
+      <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+      <filter class="solr.StandardFilterFactory"/>
+      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+    </analyzer>
+    <analyzer type="query">
+      <tokenizer class="solr.StandardTokenizerFactory"/>
+      <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+      <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+      <filter class="solr.StandardFilterFactory"/>
+      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+    </analyzer>
+  </fieldType>
+  
  </types>
 
 

Modified: lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema.xml?rev=1700800&r1=1700799&r2=1700800&view=diff
==============================================================================
--- lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema.xml (original)
+++ lucene/dev/branches/lucene6699/solr/core/src/test-files/solr/collection1/conf/schema.xml Wed Sep  2 13:06:13 2015
@@ -508,7 +508,7 @@
    <field name="standardfilt" type="standardfilt" indexed="true" stored="true"/>
    <field name="lowerfilt" type="lowerfilt" indexed="true" stored="true"/>
    <field name="lowerfilt1" type="lowerfilt" indexed="true" stored="true"/>
-	 <field name="lowerfilt1and2" type="lowerfilt" indexed="true" stored="true"/>
+   <field name="lowerfilt1and2" type="lowerfilt" indexed="true" stored="true"/>
    <field name="patterntok" type="patterntok" indexed="true" stored="true"/>
    <field name="patternreplacefilt" type="patternreplacefilt" indexed="true" stored="true"/>
    <field name="porterfilt" type="porterfilt" indexed="true" stored="true"/>
@@ -665,22 +665,22 @@
    <copyField source="title" dest="title_stringNoNorms"/>
 
    <copyField source="title" dest="text"/>
-	 <copyField source="subject" dest="text"/>
+   <copyField source="subject" dest="text"/>
 
-	 <copyField source="lowerfilt1" dest="lowerfilt1and2"/>
-	 <copyField source="lowerfilt" dest="lowerfilt1and2"/>
+   <copyField source="lowerfilt1" dest="lowerfilt1and2"/>
+   <copyField source="lowerfilt" dest="lowerfilt1and2"/>
 
-	 <copyField source="*_t" dest="text"/>
+   <copyField source="*_t" dest="text"/>
 
-	 <copyField source="id"            dest="range_facet_l"/>
-	 <copyField source="range_facet_f" dest="range_facet_d"/>
-	 <copyField source="range_facet_f1" dest="range_facet_f1_dv"/>
-	 
-	 <copyField source="id"            dest="range_facet_l_dv"/>
-	 <copyField source="id"            dest="range_facet_i_dv"/>
-	 <copyField source="range_facet_f" dest="range_facet_f_dv"/>
-	 <copyField source="range_facet_f" dest="range_facet_d_dv"/>
-	 <copyField source="bday" dest="range_facet_dt_dv"/>
+   <copyField source="id"            dest="range_facet_l"/>
+   <copyField source="range_facet_f" dest="range_facet_d"/>
+   <copyField source="range_facet_f1" dest="range_facet_f1_dv"/>
+   
+   <copyField source="id"            dest="range_facet_l_dv"/>
+   <copyField source="id"            dest="range_facet_i_dv"/>
+   <copyField source="range_facet_f" dest="range_facet_f_dv"/>
+   <copyField source="range_facet_f" dest="range_facet_d_dv"/>
+   <copyField source="bday" dest="range_facet_dt_dv"/>
 
    <!-- dynamic destination -->
    <copyField source="*_dynamic" dest="dynamic_*"/>



Mime
View raw message