Java Code Examples for org.elasticsearch.common.collect.CopyOnWriteHashMap#copyOf()
The following examples show how to use
org.elasticsearch.common.collect.CopyOnWriteHashMap#copyOf() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ObjectMapper.java From Elasticsearch with Apache License 2.0 | 6 votes |
ObjectMapper(String name, String fullPath, boolean enabled, Nested nested, Dynamic dynamic, ContentPath.Type pathType, Map<String, Mapper> mappers) { super(name); this.fullPath = fullPath; this.enabled = enabled; this.nested = nested; this.dynamic = dynamic; this.pathType = pathType; if (mappers == null) { this.mappers = new CopyOnWriteHashMap<>(); } else { this.mappers = CopyOnWriteHashMap.copyOf(mappers); } this.nestedTypePathAsString = "__" + fullPath; this.nestedTypePathAsBytes = new BytesRef(nestedTypePathAsString); this.nestedTypeFilter = new TermQuery(new Term(TypeFieldMapper.NAME, nestedTypePathAsBytes)); }
Example 2
Source File: OntologyMapper.java From BioSolr with Apache License 2.0 | 5 votes |
public OntologyMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, Settings indexSettings, MultiFields multiFields, OntologySettings oSettings, Map<String, StringFieldMapper> fieldMappers) { super(simpleName, fieldType, defaultFieldType, indexSettings, multiFields, null); this.ontologySettings = oSettings; // Dynamic mappers are added to mappers map as they are used/created this.mappers = CopyOnWriteHashMap.copyOf(fieldMappers); }
Example 3
Source File: OntologyMapper.java From BioSolr with Apache License 2.0 | 5 votes |
public OntologyMapper(FieldMapper.Names names, FieldType fieldType, Boolean docValues, NamedAnalyzer indexAnalyzer, NamedAnalyzer searchAnalyzer, PostingsFormatProvider postingsFormat, DocValuesFormatProvider docValuesFormat, SimilarityProvider similarity, @Nullable Settings fieldDataSettings, Settings indexSettings, MultiFields multiFields, OntologySettings oSettings, Map<String, FieldMapper<String>> fieldMappers, ThreadPool threadPool) { super(names, 1f, fieldType, docValues, searchAnalyzer, indexAnalyzer, postingsFormat, docValuesFormat, similarity, null, fieldDataSettings, indexSettings, multiFields, null); this.ontologySettings = oSettings; // Mappers are added to mappers map as they are used/created this.mappers = CopyOnWriteHashMap.copyOf(fieldMappers); this.threadPool = threadPool; }
Example 4
Source File: OntologyMapper.java From BioSolr with Apache License 2.0 | 5 votes |
public OntologyMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, Settings indexSettings, MultiFields multiFields, OntologySettings oSettings, Map<String, StringFieldMapper> fieldMappers) { super(simpleName, fieldType, defaultFieldType, indexSettings, multiFields, null); this.ontologySettings = oSettings; // Dynamic mappers are added to mappers map as they are used/created this.mappers = CopyOnWriteHashMap.copyOf(fieldMappers); }
Example 5
Source File: OntologyMapper.java From BioSolr with Apache License 2.0 | 5 votes |
public OntologyMapper(String simpleName, MappedFieldType fieldType, MappedFieldType defaultFieldType, Settings indexSettings, MultiFields multiFields, OntologySettings oSettings, Map<String, StringFieldMapper> fieldMappers, ThreadPool threadPool) { super(simpleName, fieldType, defaultFieldType, indexSettings, multiFields, null); this.ontologySettings = oSettings; // Dynamic mappers are added to mappers map as they are used/created this.mappers = CopyOnWriteHashMap.copyOf(fieldMappers); this.threadPool = threadPool; }
Example 6
Source File: FieldNameAnalyzer.java From Elasticsearch with Apache License 2.0 | 4 votes |
public FieldNameAnalyzer(Map<String, Analyzer> analyzers) { super(Analyzer.PER_FIELD_REUSE_STRATEGY); this.analyzers = CopyOnWriteHashMap.copyOf(analyzers); }