Interface SearchProjectionBuilderFactory


public interface SearchProjectionBuilderFactory
A factory for search projection builders.

This is the main entry point for the engine to ask the backend to build search projections.

  • Method Details

    • documentReference

      SearchProjection<DocumentReference> documentReference()
    • entityLoading

      <E> SearchProjection<E> entityLoading()
    • entityReference

      <R> SearchProjection<R> entityReference()
    • id

      <I> SearchProjection<I> id(Class<I> identifierType)
    • score

    • composite

    • constant

      <T> SearchProjection<T> constant(T value)
    • throwing

      <T> SearchProjection<T> throwing(Supplier<SearchException> exceptionSupplier)
      Type Parameters:
      T - The type of projected values.
      Parameters:
      exceptionSupplier - A supplier of the exception to throw.
      Returns:
      A projection that throws an exception as soon as it's applied to at least one document.
    • byTypeName

      <T> SearchProjection<T> byTypeName(Map<String,? extends SearchProjection<? extends T>> inners)
      Type Parameters:
      T - The type of projected values.
      Parameters:
      inners - A map from type name to projection.
      Returns:
      A projection that delegates to the given projections, picking the delegate based on the document's type name.
    • rootContext

      <T> SearchProjection<T> rootContext(SearchProjection<T> inner)
      Type Parameters:
      T - The type of projected values.
      Parameters:
      inner - A projection to delegate to.
      Returns:
      A projection that executes its inner projection in the root context, ignoring any surrounding object projection.