use of org.opensearch.index.query.QueryBuilder in project fess by codelibs.
the class BsWebAuthenticationCB method build.
// ===================================================================================
// Build
// =====
@Override
public SearchRequestBuilder build(SearchRequestBuilder builder) {
if (_conditionQuery != null) {
QueryBuilder queryBuilder = _conditionQuery.getQuery();
if (queryBuilder != null) {
builder.setQuery(queryBuilder);
}
_conditionQuery.getFieldSortBuilderList().forEach(sort -> {
builder.addSort(sort);
});
}
if (_conditionAggregation != null) {
_conditionAggregation.getAggregationBuilderList().forEach(builder::addAggregation);
}
if (_specification != null) {
builder.setFetchSource(_specification.columnList.toArray(new String[_specification.columnList.size()]), null);
}
return builder;
}
use of org.opensearch.index.query.QueryBuilder in project fess by codelibs.
the class BsGroupCB method build.
// ===================================================================================
// Build
// =====
@Override
public SearchRequestBuilder build(SearchRequestBuilder builder) {
if (_conditionQuery != null) {
QueryBuilder queryBuilder = _conditionQuery.getQuery();
if (queryBuilder != null) {
builder.setQuery(queryBuilder);
}
_conditionQuery.getFieldSortBuilderList().forEach(sort -> {
builder.addSort(sort);
});
}
if (_conditionAggregation != null) {
_conditionAggregation.getAggregationBuilderList().forEach(builder::addAggregation);
}
if (_specification != null) {
builder.setFetchSource(_specification.columnList.toArray(new String[_specification.columnList.size()]), null);
}
return builder;
}
use of org.opensearch.index.query.QueryBuilder in project fess by codelibs.
the class IndexingHelper method getChildDocumentList.
public List<Map<String, Object>> getChildDocumentList(final SearchEngineClient searchEngineClient, final String id, final String[] fields) {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final QueryBuilder queryBuilder = QueryBuilders.termQuery(fessConfig.getIndexFieldParentId(), id);
return getDocumentListByQuery(searchEngineClient, queryBuilder, fields);
}
use of org.opensearch.index.query.QueryBuilder in project fess by codelibs.
the class IndexingHelper method deleteBySessionId.
public long deleteBySessionId(final String sessionId) {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final String index = fessConfig.getIndexDocumentUpdateIndex();
final QueryBuilder queryBuilder = QueryBuilders.termQuery(fessConfig.getIndexFieldSegment(), sessionId);
return deleteByQueryBuilder(index, queryBuilder);
}
use of org.opensearch.index.query.QueryBuilder in project fess by codelibs.
the class IndexingHelper method deleteByVirtualHost.
public long deleteByVirtualHost(final String virtualHost) {
final FessConfig fessConfig = ComponentUtil.getFessConfig();
final String index = fessConfig.getIndexDocumentUpdateIndex();
final QueryBuilder queryBuilder = QueryBuilders.termQuery(fessConfig.getIndexFieldVirtualHost(), virtualHost);
return deleteByQueryBuilder(index, queryBuilder);
}
Aggregations