/** Return a term that uniquely identifies the document, or {@code null} if the type is not allowed. */ public Term createUidTerm(String type, String id) { if (hasMapping(type) == false) { return null; } if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) { assert indexSettings.isSingleType(); return new Term(IdFieldMapper.NAME, Uid.encodeId(id)); } else if (indexSettings.isSingleType()) { return new Term(IdFieldMapper.NAME, id); } else { return new Term(UidFieldMapper.NAME, Uid.createUidAsBytes(type, id)); } } }
/** Return a term that uniquely identifies the document, or {@code null} if the type is not allowed. */ public Term createUidTerm(String type, String id) { if (hasMapping(type) == false) { return null; } if (indexSettings.isSingleType()) { return new Term(IdFieldMapper.NAME, id); } else { return new Term(UidFieldMapper.NAME, Uid.createUidAsBytes(type, id)); } } }
private boolean hasPercolatorType(IndexShard indexShard) { ShardId otherShardId = indexShard.shardId(); return shardId.equals(otherShardId) && mapperService.hasMapping(BatchPercolatorService.TYPE_NAME); }
private boolean hasPercolatorType(IndexShard indexShard) { ShardId otherShardId = indexShard.shardId(); return shardId.equals(otherShardId) && mapperService.hasMapping(PercolatorService.TYPE_NAME); }
/** Return a term that uniquely identifies the document, or {@code null} if the type is not allowed. */ public Term createUidTerm(String type, String id) { if (hasMapping(type) == false) { return null; } if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) { assert indexSettings.isSingleType(); return new Term(IdFieldMapper.NAME, Uid.encodeId(id)); } else if (indexSettings.isSingleType()) { return new Term(IdFieldMapper.NAME, id); } else { return new Term(UidFieldMapper.NAME, Uid.createUidAsBytes(type, id)); } } }
/** Return a term that uniquely identifies the document, or {@code null} if the type is not allowed. */ public Term createUidTerm(String type, String id) { if (hasMapping(type) == false) { return null; } if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_0_0_beta1)) { assert indexSettings.isSingleType(); return new Term(IdFieldMapper.NAME, Uid.encodeId(id)); } else if (indexSettings.isSingleType()) { return new Term(IdFieldMapper.NAME, id); } else { return new Term(UidFieldMapper.NAME, Uid.createUidAsBytes(type, id)); } } }
boolean filterPercolateType = hasMapping(PercolatorService.TYPE_NAME); if (types != null && filterPercolateType) { for (String type : types) {