org.hibernate.search.backend.spi

## Interface DeletionQuery

- All Known Implementing Classes:
    SingularTermDeletionQuery

      public interface DeletionQuery

  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).
  Author:
    Martin Braun
  Experimental

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getQueryKey()` used to identify the type of query faster (no need for instanceof checks)
    `String[]` | `serialize()` 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
    `Query` | `toLuceneQuery(DocumentBuilderIndexedEntity documentBuilder)` converts this DeletionQuery to a Lucene Query

- - ### Method Detail

    - #### getQueryKey

          int getQueryKey()

      used to identify the type of query faster (no need for instanceof checks)
      Returns:
        the unique query key

    - #### toLuceneQuery

          Query toLuceneQuery(DocumentBuilderIndexedEntity documentBuilder)

      converts this DeletionQuery to a Lucene Query
      Parameters:
        `documentBuilder` - the document builder of this entity
      Returns:
        the deletion query as Lucene `Query`

    - #### serialize

          String[] serialize()

      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
      Returns:
        a String[] representation of this DeletionQuery

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved