org.springframework.data.elasticsearch.client.erhlc.NativeSearchQueryBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-data-elasticsearch Show documentation
Show all versions of spring-data-elasticsearch Show documentation
Spring Data Implementation for Elasticsearch
/*
* Copyright 2013-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.client.erhlc;
import static org.springframework.util.CollectionUtils.*;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.script.mustache.SearchTemplateRequestBuilder;
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
import org.elasticsearch.search.aggregations.PipelineAggregationBuilder;
import org.elasticsearch.search.collapse.CollapseBuilder;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder;
import org.elasticsearch.search.sort.SortBuilder;
import org.elasticsearch.search.suggest.SuggestBuilder;
import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder;
import org.springframework.data.elasticsearch.core.query.IndicesOptions;
import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.data.elasticsearch.core.query.RescorerQuery;
import org.springframework.lang.Nullable;
/**
* NativeSearchQuery
*
* @author Rizwan Idrees
* @author Mohsin Husen
* @author Artur Konczak
* @author Mark Paluch
* @author Alen Turkovic
* @author Sascha Woo
* @author Jean-Baptiste Nizet
* @author Martin Choraine
* @author Farid Azaza
* @author Peter-Josef Meisch
* @author Peer Mueller
* @author vdisk
* @author owen.qq
* @deprecated since 5.0
*/
@Deprecated
public class NativeSearchQueryBuilder extends BaseQueryBuilder {
@Nullable private QueryBuilder queryBuilder;
@Nullable private QueryBuilder filterBuilder;
private final List scriptFields = new ArrayList<>();
private final List> sortBuilders = new ArrayList<>();
private final List> aggregationBuilders = new ArrayList<>();
private final List pipelineAggregationBuilders = new ArrayList<>();
@Nullable private HighlightBuilder highlightBuilder;
@Nullable private List highlightFields = new ArrayList<>();
@Nullable protected List storedFields;
@Nullable private CollapseBuilder collapseBuilder;
@Nullable private SearchTemplateRequestBuilder searchTemplateBuilder;
@Nullable private SearchType searchType;
@Nullable private Boolean trackTotalHits;
@Nullable private Duration timeout;
private final List rescorerQueries = new ArrayList<>();
@Nullable private SuggestBuilder suggestBuilder;
@Nullable private List