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


Java CharArraySet.addAll方法代码示例

本文整理汇总了Java中org.apache.lucene.analysis.util.CharArraySet.addAll方法的典型用法代码示例。如果您正苦于以下问题:Java CharArraySet.addAll方法的具体用法?Java CharArraySet.addAll怎么用?Java CharArraySet.addAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.lucene.analysis.util.CharArraySet的用法示例。


在下文中一共展示了CharArraySet.addAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CapitalizationFilterFactory

import org.apache.lucene.analysis.util.CharArraySet; //导入方法依赖的package包/类
/** Creates a new CapitalizationFilterFactory */
public CapitalizationFilterFactory(Map<String, String> args) {
  super(args);
  assureMatchVersion();
  boolean ignoreCase = getBoolean(args, KEEP_IGNORE_CASE, false);
  Set<String> k = getSet(args, KEEP);
  if (k != null) {
    keep = new CharArraySet(10, ignoreCase);
    keep.addAll(k);
  }

  k = getSet(args, OK_PREFIX);
  if (k != null) {
    okPrefix = new ArrayList<>();
    for (String item : k) {
      okPrefix.add(item.toCharArray());
    }
  }

  minWordLength = getInt(args, MIN_WORD_LENGTH, 0);
  maxWordCount = getInt(args, MAX_WORD_COUNT, CapitalizationFilter.DEFAULT_MAX_WORD_COUNT);
  maxTokenLength = getInt(args, MAX_TOKEN_LENGTH, CapitalizationFilter.DEFAULT_MAX_TOKEN_LENGTH);
  onlyFirstWord = getBoolean(args, ONLY_FIRST_WORD, true);
  forceFirstLetter = getBoolean(args, FORCE_FIRST_LETTER, true);
  if (!args.isEmpty()) {
    throw new IllegalArgumentException("Unknown parameters: " + args);
  }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:CapitalizationFilterFactory.java

示例2: makeStopSet

import org.apache.lucene.analysis.util.CharArraySet; //导入方法依赖的package包/类
/**
 * @deprecated Use {@link #makeStopSet(String[],boolean)}
 */
@Deprecated
public static CharArraySet makeStopSet(Version matchVersion, String[] stopWords, boolean ignoreCase) {
  CharArraySet stopSet = new CharArraySet(matchVersion, stopWords.length, ignoreCase);
  stopSet.addAll(Arrays.asList(stopWords));
  return stopSet;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:StopFilter.java

示例3: resolveNamedWords

import org.apache.lucene.analysis.util.CharArraySet; //导入方法依赖的package包/类
private static CharArraySet resolveNamedWords(Collection<String> words, Map<String, Set<?>> namedWords, boolean ignoreCase) {
    if (namedWords == null) {
        return new CharArraySet(words, ignoreCase);
    }
    CharArraySet setWords = new CharArraySet(words.size(), ignoreCase);
    for (String word : words) {
        if (namedWords.containsKey(word)) {
            setWords.addAll(namedWords.get(word));
        } else {
            setWords.add(word);
        }
    }
    return setWords;
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:15,代码来源:Analysis.java


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