org.hibernate.search.backend.spi.DeletionQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-engine Show documentation
Show all versions of hibernate-search-engine Show documentation
Core of the Object/Lucene mapper, query engine and index management
/*
* 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.backend.spi;
import org.apache.lucene.search.Query;
import org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity;
/**
* interface for Serializable Queries that can be used to delete from an index.
* These have to be passed safely between VMs (we cannot rely on Lucene's queries here
* because of that).
*
* @hsearch.experimental
*
* @author Martin Braun
*/
public interface DeletionQuery {
/**
* used to identify the type of query faster (no need for instanceof checks)
* @return the unique query key
*/
int getQueryKey();
/**
* converts this DeletionQuery to a Lucene Query
*
* @param documentBuilder the document builder of this entity
* @return the deletion query as Lucene {@link Query}
*/
Query toLuceneQuery(DocumentBuilderIndexedEntity documentBuilder);
/**
* We are serializing to a String array here instead of a byte array since we don't want implementors to use the
* standard Java Serialization API by mistake
* @return a String[] representation of this DeletionQuery
*/
String[] serialize();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy