Interface FastStreamingDocsCallback


  • public interface FastStreamingDocsCallback
    • Method Detail

      • initDocList

        default Object initDocList​(Long numFound,
                                   Long start,
                                   Float maxScore)
        callback for a doclist
        Returns:
        the object to be shared with all the {startDoc(Object)} calls. return null if nothing needs to be shared
      • startDoc

        Object startDoc​(Object docListObj)
        Started a document
        Parameters:
        docListObj - This object is the value returned by the {initDocList(Long, Long, Float)} method
        Returns:
        any arbitrary object that should be shared between each field
      • field

        void field​(DataEntry field,
                   Object docObj)
        FOund a new field
        Parameters:
        field - Read the appropriate value
        docObj - The object returned by {startDoc(Object)} method
      • endDoc

        default void endDoc​(Object docObj)
        A document ends
        Parameters:
        docObj - The object returned by {startDoc(Object)} method
      • startChildDoc

        default Object startChildDoc​(Object parentDocObj)
        A new child doc starts
        Parameters:
        parentDocObj - an objec that will be shared across all the {field(DataEntry, Object)}
        Returns:
        any custom object that be shared with the fields in this child doc