Java 类org.apache.lucene.analysis.commongrams.CommonGramsFilter 实例源码

项目:elasticsearch_my    文件:CommonGramsTokenFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
    CommonGramsFilter filter = new CommonGramsFilter(tokenStream, words);
    if (queryMode) {
        return new CommonGramsQueryFilter(filter);
    } else {
        return filter;
    }
}
项目:Elasticsearch    文件:CommonGramsTokenFilterFactory.java   
@Override
public TokenStream create(TokenStream tokenStream) {
    CommonGramsFilter filter = new CommonGramsFilter(tokenStream, words);
    if (queryMode) {
        return new CommonGramsQueryFilter(filter);
    } else {
        return filter;
    }
}
项目:search    文件:TestRandomChains.java   
static Object[] newFilterArgs(Random random, TokenStream stream, Class<?>[] paramTypes) {
  Object[] args = new Object[paramTypes.length];
  for (int i = 0; i < args.length; i++) {
    Class<?> paramType = paramTypes[i];
    if (paramType == TokenStream.class) {
      args[i] = stream;
    } else if (paramType == CommonGramsFilter.class) {
      // TODO: fix this one, thats broken: CommonGramsQueryFilter takes this one explicitly
      args[i] = new CommonGramsFilter(stream, newRandomArg(random, CharArraySet.class));
    } else {
      args[i] = newRandomArg(random, paramType);
    }
  }
  return args;
}
项目:NYBC    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public CommonGramsQueryFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = new CommonGramsFilter(luceneMatchVersion, input, commonWords);
  CommonGramsQueryFilter commonGramsQuery = new CommonGramsQueryFilter(
      commonGrams);
  return commonGramsQuery;
}
项目:NYBC    文件:TestRandomChains.java   
static Object[] newFilterArgs(Random random, TokenStream stream, Class<?>[] paramTypes) {
  Object[] args = new Object[paramTypes.length];
  for (int i = 0; i < args.length; i++) {
    Class<?> paramType = paramTypes[i];
    if (paramType == TokenStream.class) {
      args[i] = stream;
    } else if (paramType == CommonGramsFilter.class) {
      // TODO: fix this one, thats broken: CommonGramsQueryFilter takes this one explicitly
      args[i] = new CommonGramsFilter(TEST_VERSION_CURRENT, stream, newRandomArg(random, CharArraySet.class));
    } else {
      args[i] = newRandomArg(random, paramType);
    }
  }
  return args;
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestRandomChains.java   
static Object[] newFilterArgs(Random random, TokenStream stream, Class<?>[] paramTypes) {
  Object[] args = new Object[paramTypes.length];
  for (int i = 0; i < args.length; i++) {
    Class<?> paramType = paramTypes[i];
    if (paramType == TokenStream.class) {
      args[i] = stream;
    } else if (paramType == CommonGramsFilter.class) {
      // TODO: fix this one, thats broken: CommonGramsQueryFilter takes this one explicitly
      args[i] = new CommonGramsFilter(TEST_VERSION_CURRENT, stream, newRandomArg(random, CharArraySet.class));
    } else {
      args[i] = newRandomArg(random, paramType);
    }
  }
  return args;
}
项目:lams    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public TokenFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = (CommonGramsFilter) super.create(input);
  return new CommonGramsQueryFilter(commonGrams);
}
项目:search    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public TokenFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = (CommonGramsFilter) super.create(input);
  return new CommonGramsQueryFilter(commonGrams);
}
项目:NYBC    文件:CommonGramsFilterFactory.java   
@Override
public CommonGramsFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = new CommonGramsFilter(luceneMatchVersion, input, commonWords);
  return commonGrams;
}
项目:read-open-source-code    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public TokenFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = (CommonGramsFilter) super.create(input);
  return new CommonGramsQueryFilter(commonGrams);
}
项目:read-open-source-code    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public TokenFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = (CommonGramsFilter) super.create(input);
  return new CommonGramsQueryFilter(commonGrams);
}
项目:read-open-source-code    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public TokenFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = (CommonGramsFilter) super.create(input);
  return new CommonGramsQueryFilter(commonGrams);
}
项目:Maskana-Gestor-de-Conocimiento    文件:CommonGramsQueryFilterFactory.java   
/**
 * Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
 */
@Override
public TokenFilter create(TokenStream input) {
  CommonGramsFilter commonGrams = (CommonGramsFilter) super.create(input);
  return new CommonGramsQueryFilter(commonGrams);
}