io.ebean.Query.text()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(133)

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

Query.text介绍

[英]Add Full text search expressions for Document store queries.

This is currently ElasticSearch only and provides the full text expressions such as Match and Multi-Match.

This automatically makes this query a "Doc Store" query and will execute against the document store (ElasticSearch).

Expressions added here are added to the "query" section of an ElasticSearch query rather than the "filter" section.

Expressions added to the where() are added to the "filter" section of an ElasticSearch query.
[中]为文档存储查询添加全文搜索表达式。
这是目前仅有的ElasticSearch,提供了完整的文本表达式,如Match和Multi Match。
这将自动使该查询成为“文档库”查询,并将针对文档库执行(ElasticSearch)。
此处添加的表达式将添加到ElasticSearch查询的“查询”部分,而不是“筛选”部分。
添加到where()的表达式将添加到ElasticSearch查询的“过滤器”部分。

代码示例

代码示例来源:origin: org.actframework/act-ebean2

@Override
public ExpressionList<MODEL_TYPE> text() {
  return q.text();
}

代码示例来源:origin: org.actframework/act-ebean

@Override
public ExpressionList<MODEL_TYPE> text() {
  return q.text();
}

代码示例来源:origin: icode/ameba

/**
 * {@inheritDoc}
 */
@Override
public ExpressionList<T> text() {
  return query().text();
}

代码示例来源:origin: io.ebean/ebean-querybean

protected ExpressionList<T> _peekText() {
  if (textStack == null) {
   textStack = new ArrayStack<>();
   // empty so push on the queries base expression list
   textStack.push(query.text());
  }
  // return the current expression list
  return textStack.peek();
 }
}

代码示例来源:origin: org.actframework/act-ebean

private void syncEbeanQueries() {
  _sync("detail");
  q.orderBy();
  _sync("orderBy");
  q.text();
  _sync("textExpressions");
  q.where();
  _sync("whereExpressions");
  q.having();
  _sync("havingExpressions");
}

代码示例来源:origin: icode/ameba

/** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public void apply(Expression expr) {
    if (expr instanceof HavingExpression) {
      ExpressionList having = expressionList.query().having();
      ((HavingExpression) expr).getExpressionList().forEach(having::add);
      return;
    } else if (expr instanceof TextExpression) {
      TextExpression expression = (TextExpression) expr;
      ExpressionList et = expressionList.query().text();
      expression.getExpressionList().forEach(et::add);
      return;
    } else if (expr instanceof DistinctExpression) {
      expressionList.setDistinct(((DistinctExpression) expr).distinct);
      return;
    } else if (expr instanceof AbstractTextExpression) {
      expressionList.setUseDocStore(true);
    } else if (expr instanceof FilterExpression) {
      FilterExpression filter = (FilterExpression) expr;
      Query query = expressionList.query();
      query.filterMany(filter.getPath()).addAll(filter);
      return;
    }
    expressionList.add(expr);
  }
}

相关文章

Query类方法