public Collection toDocuments()

in luceneSpatial/src/main/java/org/apache/geode_examples/luceneSpatial/TrainStopSerializer.java [34:47]


  public Collection<Document> toDocuments(LuceneIndex index, TrainStop value) {

    Document doc = new Document();
    // Index the name of the train stop
    doc.add(new TextField("name", value.getName(), Field.Store.NO));

    Field[] fields = SpatialHelper.getIndexableFields(value.getLongitude(), value.getLatitude());

    for (Field field : fields) {
      doc.add(field);
    }

    return Collections.singleton(doc);
  }