public class ElasticsearchDocument extends Object implements SearchDocument
| Constructor and Description |
|---|
ElasticsearchDocument(org.elasticsearch.search.SearchHit hit)
Deprecated.
|
ElasticsearchDocument(org.elasticsearch.search.SearchHit hit,
com.google.common.base.Function<? super String,? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper) |
ElasticsearchDocument(String id,
String type,
String index,
long version,
Map<String,Object> fields,
com.google.common.base.Function<? super String,? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper) |
ElasticsearchDocument(String id,
String type,
String index,
String resourceId,
String context,
com.google.common.base.Function<? super String,? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGeoProperty(String name,
String text) |
void |
addProperty(String name)
Adds/creates a new property with the given name.
|
void |
addProperty(String name,
String text)
Adds a value to the property with the given name.
|
String |
getContext() |
String |
getId() |
String |
getIndex() |
List<String> |
getProperty(String name) |
Set<String> |
getPropertyNames()
Returns a set of the property names.
|
String |
getResource() |
Map<String,Object> |
getSource() |
String |
getType() |
long |
getVersion() |
boolean |
hasProperty(String name,
String value)
Checks whether a field occurs with a specified value in a Document.
|
@Deprecated public ElasticsearchDocument(org.elasticsearch.search.SearchHit hit)
public ElasticsearchDocument(org.elasticsearch.search.SearchHit hit,
com.google.common.base.Function<? super String,? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)
public ElasticsearchDocument(String id, String type, String index, String resourceId, String context, com.google.common.base.Function<? super String,? extends org.locationtech.spatial4j.context.SpatialContext> geoContextMapper)
public String getId()
getId in interface SearchDocumentpublic String getType()
public long getVersion()
public String getIndex()
public String getResource()
getResource in interface SearchDocumentpublic String getContext()
getContext in interface SearchDocumentpublic Set<String> getPropertyNames()
SearchDocumentgetPropertyNames in interface SearchDocumentpublic void addProperty(String name)
SearchDocumentaddProperty in interface SearchDocumentpublic void addProperty(String name, String text)
SearchDocumentaddProperty in interface SearchDocumentpublic void addGeoProperty(String name, String text)
addGeoProperty in interface SearchDocumentpublic boolean hasProperty(String name, String value)
SearchDocumenthasProperty in interface SearchDocumentpublic List<String> getProperty(String name)
getProperty in interface SearchDocumentCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.