本文整理汇总了Java中org.elasticsearch.index.settings.IndexSettings类的典型用法代码示例。如果您正苦于以下问题:Java IndexSettings类的具体用法?Java IndexSettings怎么用?Java IndexSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IndexSettings类属于org.elasticsearch.index.settings包,在下文中一共展示了IndexSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: IcuNormalizerCharFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuNormalizerCharFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String normalizationName = settings.get("name", "nfkc_cf");
Normalizer2.Mode normalizationMode;
switch (settings.get("mode", "compose")) {
case "compose_contiguous" :
normalizationMode = Normalizer2.Mode.COMPOSE_CONTIGUOUS;
break;
case "decompose" :
normalizationMode = Normalizer2.Mode.DECOMPOSE;
break;
case "fcd" :
normalizationMode = Normalizer2.Mode.FCD;
break;
default:
normalizationMode = Normalizer2.Mode.COMPOSE;
break;
}
this.normalizer = Normalizer2.getInstance(null, normalizationName, normalizationMode);
}
示例2: IcuNormalizerTokenFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuNormalizerTokenFilterFactory(Index index,
@IndexSettings Settings indexSettings,
@Assisted String name,
@Assisted Settings settings) {
super(index, indexSettings, name, settings);
String normalizationName = settings.get("name", "nfkc_cf");
Normalizer2.Mode normalizationMode;
switch (settings.get("mode", "compose")) {
case "compose_contiguous" : normalizationMode = Normalizer2.Mode.COMPOSE_CONTIGUOUS; break;
case "decompose" : normalizationMode = Normalizer2.Mode.DECOMPOSE; break;
case "fcd" : normalizationMode = Normalizer2.Mode.FCD; break;
default: normalizationMode = Normalizer2.Mode.COMPOSE; break;
}
this.normalizer = Normalizer2.getInstance(null, normalizationName, normalizationMode);
}
示例3: SherlokTokenFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public SherlokTokenFilterFactory(final Index index,
@IndexSettings final Settings indexSettings,
@Assisted final String name, @Assisted final Settings settings) {
super(index, indexSettings, name, settings);
hashBit = settings.getAsInt("bit", 1);
final int numOfHash = settings.getAsInt("size", 128);
final int seed = settings.getAsInt("seed", 0);
// indexSettings.get(setting) //FIXME
hashFunctions = MinHash.createHashFunctions(seed, numOfHash);
if (logger.isDebugEnabled()) {
logger.debug(
"Index:{} -> {}-bit minhash with {} murmur3({}) functions.",
index.name(), hashBit, numOfHash, seed);
}
}
示例4: IcuCollationTokenizerFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuCollationTokenizerFactory(Index index,
@IndexSettings Settings indexSettings,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
Collator collator = IcuCollationKeyAnalyzerProvider.createCollator(settings);
this.factory = new ICUCollationAttributeFactory(collator);
this.bufferSize = settings.getAsInt("buffer_size", KeywordTokenizer.DEFAULT_BUFFER_SIZE);
}
示例5: IcuTransformTokenFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuTransformTokenFilterFactory(Index index,
@IndexSettings Settings indexSettings,
@Assisted String name,
@Assisted Settings settings) {
super(index, indexSettings, name, settings);
String id = settings.get("id", "Null");
String s = settings.get("dir", "forward");
int dir = "forward".equals(s) ? Transliterator.FORWARD : Transliterator.REVERSE;
this.transliterator = Transliterator.getInstance(id, dir);
}
示例6: IcuFoldingCharFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuFoldingCharFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String normalizationName = "utr30";
Normalizer2.Mode normalizationMode = Normalizer2.Mode.COMPOSE;
this.normalizer = Normalizer2.getInstance(ICUFoldingFilter.class.getResourceAsStream("utr30.nrm"),
normalizationName, normalizationMode);
}
示例7: IcuCollationKeyAnalyzerProvider
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuCollationKeyAnalyzerProvider(Index index,
@IndexSettings Settings indexSettings,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.collator = createCollator(settings);
}
示例8: RegisterSherlokType
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public RegisterSherlokType(final Index index,
@IndexSettings final Settings indexSettings,
final MapperService mapperService) {
super(index, indexSettings);
mapperService.documentMapperParser().putTypeParser("sherlok",
new SherlokFieldMapper.TypeParser());
}
示例9: RegisterImageQueryParser
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
protected RegisterImageQueryParser(Index index, @IndexSettings Settings indexSettings,
IndicesQueriesRegistry indicesQueriesRegistry,
ImageQueryParser parser) {
super(index, indexSettings);
indicesQueriesRegistry.addQueryParser(parser);
}
示例10: RosetteAnalyzerProvider
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public RosetteAnalyzerProvider(Index index, @IndexSettings Settings indexSettings,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
String lang = settings.get("bt.lang", "eng");
analyzer = RLPAnalyzerDispatcher.createAnalyzer(lang);
}
开发者ID:basis-technology-corp,项目名称:elasticsearch-analysis-rosette,代码行数:8,代码来源:RosetteAnalyzerProvider.java
示例11: EdgeNGram2TokenFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public EdgeNGram2TokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.minGram = settings.getAsInt("min_gram", EdgeNGram2TokenFilter.DEFAULT_MIN_GRAM_SIZE);
this.maxGram = settings.getAsInt("max_gram", EdgeNGram2TokenFilter.DEFAULT_MAX_GRAM_SIZE);
this.preservePositions = settings.getAsBoolean("preserve_positions", EdgeNGram2TokenFilter.DEFAULT_PRESERVE_POSITIONS);
this.side = EdgeNGram2TokenFilter.Side.getSide(settings.get("side", EdgeNGram2TokenFilter.DEFAULT_SIDE.getLabel()));
}
示例12: StandardNumberAnalyzerProvider
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public StandardNumberAnalyzerProvider(Index index, @IndexSettings Settings indexSettings,
WhitespaceTokenizerFactory tokenizerFactory,
StandardNumberTokenFilterFactory stdnumTokenFilterFactory,
UniqueTokenFilterFactory uniqueTokenFilterFactory,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.analyzer = new StandardNumberAnalyzer(tokenizerFactory, stdnumTokenFilterFactory, uniqueTokenFilterFactory);
}
示例13: StandardNumberTokenFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public StandardNumberTokenFilterFactory(Index index,
@IndexSettings Settings indexSettings,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.standardNumberService = new StandardNumberService(settings);
standardNumberService.start();
}
示例14: DecompoundTokenFilterFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public DecompoundTokenFilterFactory(Index index,
@IndexSettings Settings indexSettings, Environment env,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.decompounder = createDecompounder(env, settings);
}
示例15: IcuCollationTokenizerFactory
import org.elasticsearch.index.settings.IndexSettings; //导入依赖的package包/类
@Inject
public IcuCollationTokenizerFactory(Index index,
@IndexSettings Settings indexSettings,
Environment environment,
@Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
Collator collator = IcuCollationKeyAnalyzerProvider.createCollator(environment, settings);
this.factory = new ICUCollationAttributeFactory(collator);
this.bufferSize = settings.getAsInt("buffer_size", KeywordTokenizer.DEFAULT_BUFFER_SIZE);
}