|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elasticsearch.index.AbstractIndexComponent
org.elasticsearch.index.mapper.MapperService
@ThreadSafe public class MapperService
| Nested Class Summary | |
|---|---|
static class |
MapperService.SmartNameFieldMappers
|
static class |
MapperService.SmartNameObjectMapper
|
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_MAPPING
|
| Fields inherited from class org.elasticsearch.index.AbstractIndexComponent |
|---|
componentSettings, index, indexSettings, logger |
| Constructor Summary | |
|---|---|
MapperService(Index index,
Settings indexSettings,
Environment environment,
AnalysisService analysisService)
|
|
| Method Summary | |
|---|---|
void |
add(java.lang.String type,
java.lang.String mappingSource)
|
AnalysisService |
analysisService()
|
void |
close()
|
DocumentMapper |
documentMapper(java.lang.String type)
|
DocumentMapperParser |
documentMapperParser()
|
DocumentMapper |
documentMapperWithAutoCreate(java.lang.String type)
|
FieldMappers |
fullName(java.lang.String fullName)
Returns the FieldMappers of all the FieldMappers that are
registered under the give fullName across all the different DocumentMapper types. |
boolean |
hasMapping(java.lang.String mappingType)
|
FieldMappers |
indexName(java.lang.String indexName)
Returns FieldMappers for all the FieldMappers that are registered
under the given indexName across all the different DocumentMapper types. |
org.elasticsearch.common.collect.UnmodifiableIterator<DocumentMapper> |
iterator()
|
FieldMappers |
name(java.lang.String name)
Returns FieldMappers for all the FieldMappers that are registered
under the given name across all the different DocumentMapper types. |
ObjectMappers |
objectMapper(java.lang.String path)
Returns objects mappers based on the full path of the object. |
DocumentMapper |
parse(java.lang.String mappingType,
java.lang.String mappingSource)
Just parses and returns the mapper without adding it. |
void |
remove(java.lang.String type)
|
org.apache.lucene.analysis.Analyzer |
searchAnalyzer()
|
org.apache.lucene.search.Filter |
searchFilter(java.lang.String... types)
A filter for search. |
java.util.Set<java.lang.String> |
simpleMatchToIndexNames(java.lang.String pattern)
|
MapperService.SmartNameFieldMappers |
smartName(java.lang.String smartName)
Returns smart field mappers based on a smart name. |
FieldMapper |
smartNameFieldMapper(java.lang.String smartName)
Same as smartNameFieldMappers(String) but returns the first field mapper for it. |
FieldMappers |
smartNameFieldMappers(java.lang.String smartName)
Same as smartName(String), except it returns just the field mappers. |
MapperService.SmartNameObjectMapper |
smartNameObjectMapper(java.lang.String smartName)
|
java.util.Collection<java.lang.String> |
types()
|
org.apache.lucene.search.Filter |
typesFilterFailOnMissing(java.lang.String... types)
A filter to filter based on several types. |
| Methods inherited from class org.elasticsearch.index.AbstractIndexComponent |
|---|
index, nodeName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_MAPPING
| Constructor Detail |
|---|
@Inject
public MapperService(Index index,
@IndexSettings
Settings indexSettings,
Environment environment,
AnalysisService analysisService)
| Method Detail |
|---|
public void close()
public org.elasticsearch.common.collect.UnmodifiableIterator<DocumentMapper> iterator()
iterator in interface java.lang.Iterable<DocumentMapper>public AnalysisService analysisService()
public DocumentMapperParser documentMapperParser()
public void add(java.lang.String type,
java.lang.String mappingSource)
public void remove(java.lang.String type)
public DocumentMapper parse(java.lang.String mappingType,
java.lang.String mappingSource)
throws MapperParsingException
MapperParsingExceptionpublic boolean hasMapping(java.lang.String mappingType)
public java.util.Collection<java.lang.String> types()
public DocumentMapper documentMapper(java.lang.String type)
public DocumentMapper documentMapperWithAutoCreate(java.lang.String type)
public org.apache.lucene.search.Filter searchFilter(java.lang.String... types)
public org.apache.lucene.search.Filter typesFilterFailOnMissing(java.lang.String... types)
throws TypeMissingException
TypeMissingExceptionpublic FieldMappers name(java.lang.String name)
FieldMappers for all the FieldMappers that are registered
under the given name across all the different DocumentMapper types.
name - The name to return all the FieldMappers for across all DocumentMappers.
FieldMappers for across all DocumentMapperspublic FieldMappers indexName(java.lang.String indexName)
FieldMappers for all the FieldMappers that are registered
under the given indexName across all the different DocumentMapper types.
indexName - The indexName to return all the FieldMappers for across all DocumentMappers.
FieldMappers across all DocumentMappers for the given indexName.public FieldMappers fullName(java.lang.String fullName)
FieldMappers of all the FieldMappers that are
registered under the give fullName across all the different DocumentMapper types.
fullName - The full name
FieldMappers across all the DocumentMappers for the given fullName.public ObjectMappers objectMapper(java.lang.String path)
public MapperService.SmartNameObjectMapper smartNameObjectMapper(java.lang.String smartName)
public FieldMapper smartNameFieldMapper(java.lang.String smartName)
smartNameFieldMappers(String) but returns the first field mapper for it. Returns
null if there is none.
public java.util.Set<java.lang.String> simpleMatchToIndexNames(java.lang.String pattern)
public FieldMappers smartNameFieldMappers(java.lang.String smartName)
smartName(String), except it returns just the field mappers.
public MapperService.SmartNameFieldMappers smartName(java.lang.String smartName)
MapperService.SmartNameFieldMappers
will have the doc mapper set.
It also (without the optional type prefix) try and find the FieldMappers for the specific
name. It will first try to find it based on the full name (with the dots if its a compound name). If
it is not found, will try and find it based on the indexName (which can be controlled in the mapping),
and last, will try it based no the name itself.
If nothing is found, returns null.
public org.apache.lucene.analysis.Analyzer searchAnalyzer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||