TrieveRubyClient::SearchOverGroupsData
Properties
| Name |
Type |
Description |
Notes |
| filters |
ChunkFilter |
|
[optional] |
| get_collisions |
Boolean |
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. |
[optional] |
| get_total_pages |
Boolean |
Get total page count for the query accounting for the applied filters. Defaults to false, but can be set to true when the latency penalty is acceptable (typically 50-200ms). |
[optional] |
| group_size |
Integer |
Group_size is the number of chunks to fetch for each group. The default is 3. If a group has less than group_size chunks, all chunks will be returned. If this is set to a large number, we recommend setting slim_chunks to true to avoid returning the content and chunk_html of the chunks so as to lower the amount of time required for content download and serialization. |
[optional] |
| highlight_delimiters |
Array<String> |
Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to ["?", ",", ".", "!"]. These are the characters that will be used to split the chunk_html into splits for highlighting. |
[optional] |
| highlight_max_length |
Integer |
Set highlight_max_length to control the maximum number of tokens (typically whitespace separated strings, but sometimes also word stems) which can be present within a single highlight. If not specified, this defaults to 8. This is useful to shorten large splits which may have low scores due to length compared to the query. Set to something very large like 100 to highlight entire splits. |
[optional] |
| highlight_max_num |
Integer |
Set highlight_max_num to control the maximum number of highlights per chunk. If not specified, this defaults to 3. It may be less than 3 if no snippets score above the highlight_threshold. |
[optional] |
| highlight_results |
Boolean |
Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response. |
[optional] |
| highlight_threshold |
Float |
Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0. |
[optional] |
| highlight_window |
Integer |
Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response's highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. |
[optional] |
| page |
Integer |
Page of group results to fetch. Page is 1-indexed. |
[optional] |
| page_size |
Integer |
Page size is the number of group results to fetch. The default is 10. |
[optional] |
| query |
String |
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. |
|
| score_threshold |
Float |
Set score_threshold to a float to filter out chunks with a score below the threshold. |
[optional] |
| search_type |
String |
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. |
|
| slim_chunks |
Boolean |
Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typicall 10-50ms). Default is false. |
[optional] |
Example
require 'trieve_ruby_client'
instance = TrieveRubyClient::SearchOverGroupsData.new(
filters: null,
get_collisions: null,
get_total_pages: null,
group_size: null,
highlight_delimiters: null,
highlight_max_length: null,
highlight_max_num: null,
highlight_results: null,
highlight_threshold: null,
highlight_window: null,
page: null,
page_size: null,
query: null,
score_threshold: null,
search_type: null,
slim_chunks: null
)