|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.index.AbstractIndexComponent org.elasticsearch.index.mapper.MapperService
public class MapperService
Nested Class Summary | |
---|---|
static class |
MapperService.SmartNameFieldMappers
|
static class |
MapperService.SmartNameObjectMapper
|
Field Summary | |
---|---|
static 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(String type,
String mappingSource)
|
AnalysisService |
analysisService()
|
void |
close()
|
DocumentMapper |
documentMapper(String type)
|
DocumentMapperParser |
documentMapperParser()
|
DocumentMapper |
documentMapperWithAutoCreate(String type)
|
FieldMappers |
fullName(String fullName)
Returns the FieldMappers of all the FieldMapper s that are
registered under the give fullName across all the different DocumentMapper types. |
boolean |
hasMapping(String mappingType)
|
boolean |
hasNested()
|
FieldMappers |
indexName(String indexName)
Returns FieldMappers for all the FieldMapper s that are registered
under the given indexName across all the different DocumentMapper types. |
com.google.common.collect.UnmodifiableIterator<DocumentMapper> |
iterator()
|
FieldMappers |
name(String name)
Returns FieldMappers for all the FieldMapper s that are registered
under the given name across all the different DocumentMapper types. |
ObjectMappers |
objectMapper(String path)
Returns objects mappers based on the full path of the object. |
DocumentMapper |
parse(String mappingType,
String mappingSource)
Just parses and returns the mapper without adding it. |
void |
remove(String type)
|
org.apache.lucene.analysis.Analyzer |
searchAnalyzer()
|
org.apache.lucene.search.Filter |
searchFilter(String... types)
A filter for search. |
org.apache.lucene.analysis.Analyzer |
searchQuoteAnalyzer()
|
Set<String> |
simpleMatchToIndexNames(String pattern)
|
MapperService.SmartNameFieldMappers |
smartName(String smartName)
Returns smart field mappers based on a smart name. |
MapperService.SmartNameFieldMappers |
smartName(String smartName,
String[] types)
|
FieldMapper |
smartNameFieldMapper(String smartName)
Same as smartNameFieldMappers(String) but returns the first field mapper for it. |
FieldMapper |
smartNameFieldMapper(String smartName,
String[] types)
|
FieldMappers |
smartNameFieldMappers(String smartName)
Same as smartName(String) , except it returns just the field mappers. |
FieldMappers |
smartNameFieldMappers(String smartName,
String[] types)
|
MapperService.SmartNameObjectMapper |
smartNameObjectMapper(String smartName)
|
MapperService.SmartNameObjectMapper |
smartNameObjectMapper(String smartName,
String[] types)
|
Collection<String> |
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 String DEFAULT_MAPPING
Constructor Detail |
---|
@Inject public MapperService(Index index, @IndexSettings Settings indexSettings, Environment environment, AnalysisService analysisService)
Method Detail |
---|
public void close()
public boolean hasNested()
public com.google.common.collect.UnmodifiableIterator<DocumentMapper> iterator()
iterator
in interface Iterable<DocumentMapper>
public AnalysisService analysisService()
public DocumentMapperParser documentMapperParser()
public void add(String type, String mappingSource)
public void remove(String type)
public DocumentMapper parse(String mappingType, String mappingSource) throws MapperParsingException
MapperParsingException
public boolean hasMapping(String mappingType)
public Collection<String> types()
public DocumentMapper documentMapper(String type)
public DocumentMapper documentMapperWithAutoCreate(String type)
@Nullable public org.apache.lucene.search.Filter searchFilter(String... types)
public FieldMappers name(String name)
FieldMappers
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 FieldMappers
for across all DocumentMapper
s.
FieldMappers
for across all DocumentMapper
spublic FieldMappers indexName(String indexName)
FieldMappers
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 FieldMappers
for across all DocumentMapper
s.
FieldMappers
across all DocumentMapper
s for the given indexName.public FieldMappers fullName(String fullName)
FieldMappers
of all the FieldMapper
s that are
registered under the give fullName across all the different DocumentMapper
types.
fullName
- The full name
FieldMappers
across all the DocumentMapper
s for the given fullName.public ObjectMappers objectMapper(String path)
public Set<String> simpleMatchToIndexNames(String pattern)
public MapperService.SmartNameObjectMapper smartNameObjectMapper(String smartName, @Nullable String[] types)
public MapperService.SmartNameObjectMapper smartNameObjectMapper(String smartName)
public FieldMapper smartNameFieldMapper(String smartName)
smartNameFieldMappers(String)
but returns the first field mapper for it. Returns
null if there is none.
public FieldMapper smartNameFieldMapper(String smartName, @Nullable String[] types)
public FieldMappers smartNameFieldMappers(String smartName, @Nullable String[] types)
public FieldMappers smartNameFieldMappers(String smartName)
smartName(String)
, except it returns just the field mappers.
public MapperService.SmartNameFieldMappers smartName(String smartName, @Nullable String[] types)
public MapperService.SmartNameFieldMappers smartName(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()
public org.apache.lucene.analysis.Analyzer searchQuoteAnalyzer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |