All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.query.dsl.MoreLikeThisMatchingContext Maven / Gradle / Ivy

/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */

package org.hibernate.search.query.dsl;

/**
 * Super interface offering the way to provide the matching content
 * as well as customize the preceding field.
 *
 * Sub interfaces are expected to clarify whether additional fields can be set.
 *
 * @author Emmanuel Bernard <[email protected]>
 */
public interface MoreLikeThisMatchingContext {

	/**
	 * Find other entities looking like the entity with the given id.
	 * Only the selected fields will be used for comparison.
	 * @param id the identifier of the entity
	 * @return {@code this} for method chaining
	 */
	MoreLikeThisTermination toEntityWithId(Object id);

	/*
	 * Find other entities looking like the entity provided.
	 * Only the selected fields will be used for comparison.
	 * If the provided entity is already indexed, the index data is used.
	 * Otherwise, we use the value of each property in the instance passed.
	 */
	//TODO genericize it
	MoreLikeThisToEntityContentAndTermination toEntity(Object entity);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy