Source code for search.services.index.exceptions

"""Exceptions raised by the search index service."""

__all__ = ('MappingError', 'IndexConnectionError', 'IndexingError',
           'QueryError', 'DocumentNotFound', 'OutsideAllowedRange')


[docs]class MappingError(ValueError): """There was a problem with the search document mapping."""
[docs]class IndexConnectionError(IOError): """There was a problem connecting to the search index."""
[docs]class IndexingError(IOError): """There was a problem adding a document to the index."""
[docs]class QueryError(ValueError): """ Elasticsearch could not handle the query. This is likely due either to a programming error that resulted in a bad index, or to a mal-formed query. """
[docs]class DocumentNotFound(RuntimeError): """Could not find a requested document in the search index."""
[docs]class OutsideAllowedRange(RuntimeError): """A page outside of the allowed range has been requested."""