当前位置: 首页>>代码示例>>Java>>正文


Java IndexSettings类代码示例

本文整理汇总了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);
}
 
开发者ID:jprante,项目名称:elasticsearch-icu,代码行数:22,代码来源:IcuNormalizerCharFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-icu,代码行数:17,代码来源:IcuNormalizerTokenFilterFactory.java

示例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);
    }
}
 
开发者ID:sherlok,项目名称:sherlastic,代码行数:21,代码来源:SherlokTokenFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-icu,代码行数:10,代码来源:IcuCollationTokenizerFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-icu,代码行数:12,代码来源:IcuTransformTokenFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-icu,代码行数:9,代码来源:IcuFoldingCharFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-icu,代码行数:8,代码来源:IcuCollationKeyAnalyzerProvider.java

示例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());
}
 
开发者ID:sherlok,项目名称:sherlastic,代码行数:10,代码来源:RegisterSherlokType.java

示例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);
}
 
开发者ID:kzwang,项目名称:elasticsearch-image,代码行数:8,代码来源:RegisterImageQueryParser.java

示例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()));
}
 
开发者ID:yakaz,项目名称:elasticsearch-analysis-edgengram2,代码行数:9,代码来源:EdgeNGram2TokenFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-analysis-german,代码行数:10,代码来源:StandardNumberAnalyzerProvider.java

示例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();
}
 
开发者ID:jprante,项目名称:elasticsearch-analysis-german,代码行数:9,代码来源:StandardNumberTokenFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-analysis-german,代码行数:8,代码来源:DecompoundTokenFilterFactory.java

示例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);
}
 
开发者ID:jprante,项目名称:elasticsearch-analysis-german,代码行数:11,代码来源:IcuCollationTokenizerFactory.java


注:本文中的org.elasticsearch.index.settings.IndexSettings类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。