コード例 #1
0
 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 QueryWrapperFilter(
           new TermQuery(new Term(TypeFieldMapper.NAME, nestedTypePathAsBytes)));
 }
コード例 #2
0
 public FieldNameAnalyzer(Map<String, Analyzer> analyzers, Analyzer defaultAnalyzer) {
   super(Analyzer.PER_FIELD_REUSE_STRATEGY);
   this.analyzers = CopyOnWriteHashMap.copyOf(analyzers);
   this.defaultAnalyzer = defaultAnalyzer;
 }