
org.hibernate.search.query.dsl.FacetContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-v5migrationhelper-engine Show documentation
Show all versions of hibernate-search-v5migrationhelper-engine Show documentation
Helper to migrate from Hibernate Search 5 to 6, providing partial support for Hibernate Search 5 Engine APIs on top of Hibernate Search 6
The newest version!
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.query.dsl;
import java.util.function.Function;
import org.hibernate.search.engine.search.aggregation.AggregationKey;
import org.hibernate.search.engine.search.query.SearchQuery;
import org.hibernate.search.engine.search.query.SearchResult;
import org.hibernate.search.engine.search.query.dsl.SearchQueryOptionsStep;
/**
* @author Hardy Ferentschik
*
* @deprecated Instead of using Hibernate Search 5 APIs, get a {@code org.hibernate.search.mapper.orm.session.SearchSession}
* using {@code org.hibernate.search.mapper.orm.Search#session(org.hibernate.Session)},
* create a {@link SearchQuery} with {@code org.hibernate.search.mapper.orm.session.SearchSession#search(Class)},
* and define your facets (now called aggregations)
* using {@link SearchQueryOptionsStep#aggregation(AggregationKey, Function)}.
* You can then fetch the query result using {@link SearchQuery#fetch(Integer)}
* and get each aggregation using {@link SearchResult#aggregation(AggregationKey)}.
* Refer to the migration guide for more information.
*/
@Deprecated
public interface FacetContext {
/**
* @param name the name for this facet request
*
* @return a {@code FacetFieldContext} to continue building the facet request
*/
FacetFieldContext name(String name);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy