Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/323#discussion_r173524870
  
    --- Diff: 
solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java ---
    @@ -486,16 +486,14 @@ private Object decodeDVField(int localId, LeafReader 
leafReader, String fieldNam
           case SORTED_NUMERIC:
             final SortedNumericDocValues numericDv = 
leafReader.getSortedNumericDocValues(fieldName);
             if (numericDv != null && numericDv.advance(localId) == localId) {
    -          if (schemaField.getType() instanceof LatLonPointSpatialField) {
    -            long number = numericDv.nextValue();
    -            return ((LatLonPointSpatialField) 
schemaField.getType()).geoValueToStringValue(number);
    -          }
               final List<Object> outValues = new 
ArrayList<>(numericDv.docValueCount());
               for (int i = 0; i < numericDv.docValueCount(); i++) {
                 long number = numericDv.nextValue();
                 Object value = decodeNumberFromDV(schemaField, number, true);
                 // return immediately if the number is not decodable, hence 
won't return an empty list.
                 if (value == null) return null;
    +            // return the value as "lat, lon" if its not multi-valued
    --- End diff --
    
    This is not consistent with how Solr normally does things.  If the field 
type is declared as multiValued then we normally always return as a list; 
otherwise we never do.  Here I think you're making that vary per document 
dependent on how many values the document has.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to