@Override public void get(List<CharSequence> list) throws IOException { for (int i = 0, count = values.docValueCount(); i < count; ++i) { list.add(values.nextValue().toString()); } } });
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { return replaceMissing(valuesSource.bytesValues(context), new BytesRef(missing.toString())); }
@Override public String getMaxValueAsString() { return maxValue.toString(); } }
@Override public String getMinValueAsString() { return minValue.toString(); }
private String toESFormat(String coordinateValue) { String[] split = coordinateValue.split(","); GeoPoint geoPoint = new GeoPoint(Double.parseDouble(split[0]), Double.parseDouble(split[1])); return geoPoint.toString(); } }
@Override public int hashCode() { return hashCode(size, center.toString(), bounds); }
context.doc().add(new StoredField(fieldType().name(), point.toString()));
@Override public void get(List<CharSequence> list) throws IOException { for (int i = 0, count = values.docValueCount(); i < count; ++i) { list.add(values.nextValue().toString()); } } });
@Override public void get(List<CharSequence> list) throws IOException { for (int i = 0, count = values.docValueCount(); i < count; ++i) { list.add(values.nextValue().toString()); } } });
@Override public void get(int docID, List<CharSequence> list) { values.setDocument(docID); for (int i = 0, count = values.count(); i < count; ++i) { list.add(values.valueAt(i).toString()); } } });
@Override public void get(int docID, List<CharSequence> list) { values.setDocument(docID); for (int i = 0, count = values.count(); i < count; ++i) { list.add(values.valueAt(i).toString()); } } });
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { return replaceMissing(valuesSource.bytesValues(context), new BytesRef(missing.toString())); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { return replaceMissing(valuesSource.bytesValues(context), new BytesRef(missing.toString())); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { return replaceMissing(valuesSource.bytesValues(context), new BytesRef(missing.toString())); }
@Override public SortedBinaryDocValues bytesValues(LeafReaderContext context) throws IOException { return replaceMissing(valuesSource.bytesValues(context), new BytesRef(missing.toString())); }
Log.e("submit","Current point: "+mCurrentPoint.toString());
context.doc().add(new StoredField(fieldType().name(), point.toString()));
@Override public void parse(ParseContext originalContext, GeoPoint point, String geoHash) throws IOException { // Geopoint fields, by default, will not be included in _all final ParseContext context = originalContext.setIncludeInAllDefault(false); if (ignoreMalformed.value() == false) { if (point.lat() > 90.0 || point.lat() < -90.0) { throw new IllegalArgumentException("illegal latitude value [" + point.lat() + "] for " + name()); } if (point.lon() > 180.0 || point.lon() < -180) { throw new IllegalArgumentException("illegal longitude value [" + point.lon() + "] for " + name()); } } else { GeoUtils.normalizePoint(point); } if (fieldType().indexOptions() != IndexOptions.NONE) { context.doc().add(new LatLonPoint(fieldType().name(), point.lat(), point.lon())); } if (fieldType().stored()) { context.doc().add(new StoredField(fieldType().name(), point.toString())); } if (fieldType.hasDocValues()) { context.doc().add(new LatLonDocValuesField(fieldType().name(), point.lat(), point.lon())); } // if the mapping contains multifields then use the geohash string if (multiFields.iterator().hasNext()) { multiFields.parse(this, context.createExternalValueContext(point.geohash())); } } }
context.doc().add(new StoredField(fieldType().name(), point.toString()));