|
|||||||||
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
|
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)
|
DocumentMapper |
documentMapper(java.lang.String type)
|
DocumentMapperParser |
documentMapperParser()
|
FieldMappers |
fullName(java.lang.String fullName)
Returns the MapperService.SmartNameFieldMappers of all the FieldMapper s that are
registered under the give fullName across all the different DocumentMapper types. |
boolean |
hasMapping(java.lang.String mappingType)
|
FieldMappers |
idFieldMappers()
|
FieldMappers |
indexName(java.lang.String indexName)
Returns MapperService.SmartNameFieldMappers for all the FieldMapper s 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 MapperService.SmartNameFieldMappers for all the FieldMapper s that are registered
under the given name across all the different DocumentMapper types. |
DocumentMapper |
parse(java.lang.String mappingType,
java.lang.String mappingSource)
Just parses and returns the mapper without adding it. |
org.apache.lucene.analysis.Analyzer |
searchAnalyzer()
|
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. |
FieldMappers |
sourceFieldMappers()
|
DocumentMapper |
type(java.lang.String type)
|
FieldMappers |
typeFieldMappers()
|
FieldMappers |
uidFieldMappers()
|
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 org.elasticsearch.common.collect.UnmodifiableIterator<DocumentMapper> iterator()
iterator
in interface java.lang.Iterable<DocumentMapper>
public DocumentMapper type(java.lang.String type)
public DocumentMapperParser documentMapperParser()
public void add(java.lang.String type, java.lang.String mappingSource)
public DocumentMapper parse(java.lang.String mappingType, java.lang.String mappingSource) throws MapperParsingException
MapperParsingException
public boolean hasMapping(java.lang.String mappingType)
public DocumentMapper documentMapper(java.lang.String type)
public FieldMappers idFieldMappers()
public FieldMappers typeFieldMappers()
public FieldMappers sourceFieldMappers()
public FieldMappers uidFieldMappers()
public FieldMappers name(java.lang.String name)
MapperService.SmartNameFieldMappers
for all the FieldMapper
s that are registered
under the given name across all the different DocumentMapper
types.
name
- The name to return all the MapperService.SmartNameFieldMappers
for across all DocumentMapper
s.
MapperService.SmartNameFieldMappers
for across all DocumentMapper
spublic FieldMappers indexName(java.lang.String indexName)
MapperService.SmartNameFieldMappers
for all the FieldMapper
s that are registered
under the given indexName across all the different DocumentMapper
types.
indexName
- The indexName to return all the MapperService.SmartNameFieldMappers
for across all DocumentMapper
s.
MapperService.SmartNameFieldMappers
across all DocumentMapper
s for the given indexName.public FieldMappers fullName(java.lang.String fullName)
MapperService.SmartNameFieldMappers
of all the FieldMapper
s that are
registered under the give fullName across all the different DocumentMapper
types.
fullName
- The full name
MapperService.SmartNameFieldMappers
across all the DocumentMapper
s for the given fullName.public FieldMapper smartNameFieldMapper(java.lang.String smartName)
smartNameFieldMappers(String)
but returns the first field mapper for it. Returns
null if there is none.
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 MapperService.SmartNameFieldMappers
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).
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 |