Class LuceneIndexSchemaManager

    • Method Detail

      • createIfMissing

        public CompletableFuture<?> createIfMissing​(OperationSubmitter operationSubmitter)
        Description copied from interface: IndexSchemaManager
        Creates the schema if it doesn't already exist.

        Does not change or validate anything if the schema already exists.

        Specified by:
        createIfMissing in interface IndexSchemaManager
        Parameters:
        operationSubmitter - How to handle request to submit operation when the queue is full.
        Returns:
        A future.
      • createOrValidate

        public CompletableFuture<?> createOrValidate​(ContextualFailureCollector failureCollector,
                                                     OperationSubmitter operationSubmitter)
        Description copied from interface: IndexSchemaManager
        Creates the schema if it doesn't already exist, or validates the existing schema against requirements expressed by the mapper.

        If the schema exists and validation happens, validation failures do not trigger an exception, but instead are pushed to the given collector.

        Specified by:
        createOrValidate in interface IndexSchemaManager
        Parameters:
        failureCollector - A collector for validation failures.
        operationSubmitter - How to handle request to submit operation when the queue is full.
        Returns:
        A future.
      • createOrUpdate

        public CompletableFuture<?> createOrUpdate​(OperationSubmitter operationSubmitter)
        Description copied from interface: IndexSchemaManager
        Creates the schema if it doesn't already exist, or updates the existing schema to match requirements expressed by the mapper.

        Updating the schema may be impossible (for example if the type of a field changed). In this case, the future will ultimately be completed with a SearchException.

        Specified by:
        createOrUpdate in interface IndexSchemaManager
        Parameters:
        operationSubmitter - How to handle request to submit operation when the queue is full.
        Returns:
        A future.
      • dropIfExisting

        public CompletableFuture<?> dropIfExisting​(OperationSubmitter operationSubmitter)
        Description copied from interface: IndexSchemaManager
        Drops the schema and all indexed data if it exists.

        Does not change anything if the schema does not exist.

        Specified by:
        dropIfExisting in interface IndexSchemaManager
        Parameters:
        operationSubmitter - How to handle request to submit operation when the queue is full.
        Returns:
        A future.
      • validate

        public CompletableFuture<?> validate​(ContextualFailureCollector failureCollector,
                                             OperationSubmitter operationSubmitter)
        Description copied from interface: IndexSchemaManager
        Validates the existing schema against requirements expressed by the mapper.

        If the schema does not exist, a failure is pushed to the given collector.

        If the index exists and validation happens, validation failures do not trigger an exception, but instead are pushed to the given collector.

        Specified by:
        validate in interface IndexSchemaManager
        Parameters:
        failureCollector - A collector for validation failures.
        operationSubmitter - How to handle request to submit operation when the queue is full.
        Returns:
        A future.