lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1659165 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/handler/component/
Date Thu, 12 Feb 2015 08:10:44 GMT
Author: shalin
Date: Thu Feb 12 08:10:43 2015
New Revision: 1659165

URL: http://svn.apache.org/r1659165
Log:
Fixed typos and used diamond operator

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetProcessor.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java?rev=1659165&r1=1659164&r2=1659165&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java
Thu Feb 12 08:10:43 2015
@@ -38,8 +38,8 @@ import org.apache.solr.handler.component
 public class PivotFacet extends FacetBase {
 
   /** 
-   * Local param used to indicate that refinements are requried on a pivot. Should 
-   * also be used as the prefix for contatenanting with the value to determine the 
+   * Local param used to indicate that refinements are required on a pivot. Should
+   * also be used as the prefix for concatenating with the value to determine the
    * name of the multi-valued param that will contain all of the values needed for 
    * refinement.
    */
@@ -89,7 +89,7 @@ public class PivotFacet extends FacetBas
     if (null == raw) {
       raw = Collections.<PivotFacetValue>emptyList();
     }
-    return Collections.<PivotFacetValue>unmodifiableList(raw);
+    return Collections.unmodifiableList(raw);
   }
 
   /**

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java?rev=1659165&r1=1659164&r2=1659165&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
Thu Feb 12 08:10:43 2015
@@ -65,7 +65,7 @@ public class PivotFacetHelper {
       }
       out.append(',');
     }
-    out.deleteCharAt(out.length()-1);  // prune the last seperator
+    out.deleteCharAt(out.length()-1);  // prune the last separator
     return out.toString();
     // return StrUtils.join(values, ',');
   }
@@ -80,7 +80,7 @@ public class PivotFacetHelper {
     // special case: empty list => empty string
     if (rawvals.isEmpty()) return rawvals;
 
-    List<String> out = new ArrayList<String>(rawvals.size());
+    List<String> out = new ArrayList<>(rawvals.size());
     for (String raw : rawvals) {
       assert 0 < raw.length();
       if ('^' == raw.charAt(0)) {
@@ -124,7 +124,7 @@ public class PivotFacetHelper {
    * Given a mapping of keys to {@link StatsValues} representing the currently 
    * known "merged" stats (which may be null if none exist yet), and a 
    * {@link NamedList} containing the "stats" response block returned by an individual 
-   * shard, this method accumulates the stasts for each {@link StatsField} found in 
+   * shard, this method accumulates the stats for each {@link StatsField} found in
    * the shard response with the existing mergeStats
    *
    * @return the original <code>merged</code> Map after modifying, or a new Map
if the <code>merged</code> param was originally null.
@@ -137,18 +137,18 @@ public class PivotFacetHelper {
      NamedList<NamedList<NamedList<?>>> remoteWrapper, 
      StatsInfo statsInfo) {
 
-    if (null == merged) merged = new LinkedHashMap<String,StatsValues>();
+    if (null == merged) merged = new LinkedHashMap<>();
 
     NamedList<NamedList<?>> remoteStats = StatsComponent.unwrapStats(remoteWrapper);
 
     for (Entry<String,NamedList<?>> entry : remoteStats) {
       StatsValues receivingStatsValues = merged.get(entry.getKey());
       if (receivingStatsValues == null) {
-        StatsField recievingStatsField = statsInfo.getStatsField(entry.getKey());
-        if (null == recievingStatsField) {
-          throw new SolrException(ErrorCode.SERVER_ERROR , "No stats.field found corrisponding
to pivot stats recieved from shard: "+entry.getKey());
+        StatsField receivingStatsField = statsInfo.getStatsField(entry.getKey());
+        if (null == receivingStatsField) {
+          throw new SolrException(ErrorCode.SERVER_ERROR , "No stats.field found corresponding
to pivot stats received from shard: "+entry.getKey());
         }
-        receivingStatsValues = StatsValuesFactory.createStatsValues(recievingStatsField);
+        receivingStatsValues = StatsValuesFactory.createStatsValues(receivingStatsField);
         merged.put(entry.getKey(), receivingStatsValues);
       }
       receivingStatsValues.accumulate(entry.getValue());

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetProcessor.java?rev=1659165&r1=1659164&r2=1659165&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetProcessor.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetProcessor.java
Thu Feb 12 08:10:43 2015
@@ -168,7 +168,7 @@ public class PivotFacetProcessor extends
 
       String firstFieldsValues = refinementValuesByField.get(0);
 
-      facetCounts = new NamedList<Integer>();
+      facetCounts = new NamedList<>();
       facetCounts.add(firstFieldsValues,
                       getSubsetSize(this.docs, sfield, firstFieldsValues));
     } else {
@@ -261,7 +261,7 @@ public class PivotFacetProcessor extends
           NamedList<Integer> facetCounts;
           if(!vnames.isEmpty()){
             String val = vnames.pop();
-            facetCounts = new NamedList<Integer>();
+            facetCounts = new NamedList<>();
             facetCounts.add(val, getSubsetSize(subset,
                                                searcher.getSchema().getField(subField),
                                                val));
@@ -293,7 +293,7 @@ public class PivotFacetProcessor extends
   /**
    * Given a base docset, computes the size of the subset of documents corresponding to the
specified pivotValue
    *
-   * @param base the set of documents to evalute relative to
+   * @param base the set of documents to evaluate relative to
    * @param field the field type used by the pivotValue
    * @param pivotValue String representation of the value, may be null (ie: "missing")
    */



Mime
View raw message