Class SearchChunkData


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2024-03-29T12:34:27.506198300-05:00[America/Chicago]",
               comments="Generator version: 7.4.0")
    public class SearchChunkData
    extends Object
    SearchChunkData
    • Constructor Detail

      • SearchChunkData

        public SearchChunkData()
    • Method Detail

      • getDateBias

        @Nullable
        public Boolean getDateBias()
        Set date_bias to true to bias search results towards more recent chunks. This will work best in hybrid search mode.
        Returns:
        dateBias
      • setDateBias

        public void setDateBias​(Boolean dateBias)
      • setFilters

        public void setFilters​(ChunkFilter filters)
      • getGetCollisions

        @Nullable
        public Boolean getGetCollisions()
        Set get_collisions to true to get the collisions for each chunk. This will only apply if environment variable COLLISIONS_ENABLED is set to true.
        Returns:
        getCollisions
      • setGetCollisions

        public void setGetCollisions​(Boolean getCollisions)
      • addHighlightDelimitersItem

        public SearchChunkData addHighlightDelimitersItem​(String highlightDelimitersItem)
      • getHighlightDelimiters

        @Nullable
        public List<String> getHighlightDelimiters()
        Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"].
        Returns:
        highlightDelimiters
      • setHighlightDelimiters

        public void setHighlightDelimiters​(List<String> highlightDelimiters)
      • getHighlightResults

        @Nullable
        public Boolean getHighlightResults()
        Set highlight_results to true to highlight the results. If not specified, this defaults to true.
        Returns:
        highlightResults
      • setHighlightResults

        public void setHighlightResults​(Boolean highlightResults)
      • getPage

        @Nullable
        @Min(0L)
        public @Min(0L) Long getPage()
        Page of chunks to fetch. Each page is 10 chunks. Support for custom page size is coming soon. minimum: 0
        Returns:
        page
      • setPage

        public void setPage​(Long page)
      • getPageSize

        @Nullable
        @Min(0L)
        public @Min(0L) Long getPageSize()
        Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. minimum: 0
        Returns:
        pageSize
      • setPageSize

        public void setPageSize​(Long pageSize)
      • getQuery

        @Nonnull
        @NotNull
        public @NotNull String getQuery()
        Query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set.
        Returns:
        query
      • setQuery

        public void setQuery​(String query)
      • getScoreThreshold

        @Nullable
        public Float getScoreThreshold()
        Set score_threshold to a float to filter out chunks with a score below the threshold.
        Returns:
        scoreThreshold
      • setScoreThreshold

        public void setScoreThreshold​(Float scoreThreshold)
      • getSearchType

        @Nonnull
        @NotNull
        public @NotNull String getSearchType()
        Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE.
        Returns:
        searchType
      • setSearchType

        public void setSearchType​(String searchType)
      • getUseWeights

        @Nullable
        public Boolean getUseWeights()
        Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.
        Returns:
        useWeights
      • setUseWeights

        public void setUseWeights​(Boolean useWeights)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonElement

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        IOException - if the JSON Element is invalid with respect to SearchChunkData
      • fromJson

        public static SearchChunkData fromJson​(String jsonString)
                                        throws IOException
        Create an instance of SearchChunkData given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of SearchChunkData
        Throws:
        IOException - if the JSON string is invalid with respect to SearchChunkData
      • toJson

        public String toJson()
        Convert an instance of SearchChunkData to an JSON string
        Returns:
        JSON string