org.hibernate.search.annotations.Factory类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中org.hibernate.search.annotations.Factory类的一些代码示例,展示了Factory类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory类的具体详情如下:
包路径:org.hibernate.search.annotations.Factory
类名称:Factory

Factory介绍

暂无

代码示例

代码示例来源:origin: openmrs/openmrs-core

@Factory
  public Filter getFilter() {
    BooleanQuery query = new BooleanQuery();

    if (includeTerms.isEmpty()) {
      query.add(new MatchAllDocsQuery(), Occur.MUST);
    } else {
      for (Set<Term> terms : includeTerms) {

        if (terms.size() == 1) {
          query.add(new TermQuery(terms.iterator().next()), Occur.MUST);
        } else if (terms.size() > 1) {
          BooleanQuery subquery = new BooleanQuery();
          for (Term term : terms) {
            subquery.add(new TermQuery(term), Occur.SHOULD);
          }
          query.add(subquery, Occur.MUST);
        }
      }
    }

    for (Term term : excludeTerms) {
      query.add(new TermQuery(term), Occur.MUST_NOT);
    }
    
    return new CachingWrapperFilter(new QueryWrapperFilter(query));
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
public DefaultStringBridge getInstance() {
  return INSTANCE;
}

代码示例来源:origin: org.infinispan/infinispan-embedded-query

@Factory
public DefaultStringBridge getInstance() {
  return INSTANCE;
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public static ElasticsearchAnalysisDefinitionProvider create() {
    return provider;
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public void foo() {
  }
}

代码示例来源:origin: zanata/zanata-platform

@Factory
public Filter getFilter() {
  return new LocaleFilter(this.locale);
}

代码示例来源:origin: se.vgregion.webbisar/webbisar-core-bc-composite-types

@Factory
  public Filter getFilter() {
    Filter enabledWebbisFilter = new QueryWrapperFilter(new TermQuery(new Term("disabled", "false")));
    return new CachingWrapperFilter(enabledWebbisFilter);
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public Object bar() {
    return new Object();
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public Object foo() {
    throw new IllegalArgumentException( );
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
public Object foo() {
  return new Object();
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public Query getFilter() {
    return new TermQuery( new Term( "teacher", login ) );
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
public Query buildSecurityFilter() {
  return new TermQuery( new Term( "owner", ownerName ) );
}

代码示例来源:origin: hibernate/hibernate-search

@org.hibernate.search.annotations.Factory
public Query create() {
  return new TermQuery( new Term( "score", "5" ) );
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
public Filter getFilter() {
  return new ExcludeAllFilter();
}

代码示例来源:origin: jamesagnew/hapi-fhir

@Factory
public SearchMapping getSearchMapping() {
  SearchMapping mapping = new SearchMapping();

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public Query getFilter() {
    return new TermQuery( new Term( "role", role.name() ) );
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public Filter getFilter() {
    Query query = new TermQuery( new Term( "teacher", login ) );
    return new QueryWrapperFilter( query );
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
public Query buildFilter() {
  Query q = new TermQuery( new Term( field, value ) );
  return new CachingWrapperQuery( q );
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
  public static CustomAnalyzerProvider create() {
    return new CustomAnalyzerProvider();
  }
}

代码示例来源:origin: hibernate/hibernate-search

@Factory
public Filter buildFilter() {
  Query q = new TermQuery( new Term( field, value ) );
  return new QueryWrapperFilter( q );
}

相关文章

Factory类方法