this.queryBuilder = booleanQuery;
}
// Fuzzy text
if (fuzzyText != null) {
FuzzyLikeThisQueryBuilder fuzzyQueryBuilder = QueryBuilders.fuzzyLikeThisQuery(TEXT_FUZZY).likeText(fuzzyText);
booleanQuery.must(fuzzyQueryBuilder);
this.queryBuilder = booleanQuery;
}
// Fulltext
if (fulltext != null) {
MatchQueryBuilder textQueryBuilder = QueryBuilders.matchQuery(FULLTEXT, fulltext);
booleanQuery.must(textQueryBuilder);
this.queryBuilder = booleanQuery;
}
// Fuzzy fulltext
if (fuzzyFulltext != null) {
FuzzyLikeThisQueryBuilder fuzzyQueryBuilder = QueryBuilders.fuzzyLikeThisQuery(FULLTEXT_FUZZY).likeText(fuzzyFulltext);
booleanQuery.must(fuzzyQueryBuilder);
this.queryBuilder = booleanQuery;
}
// Recency boost. We differentiate between various (random) levels of