new_in_town
08/16/2025, 2:21 PMq
. I have a search form using Typesense. My SearchParams and schema:
{
'q': searchTerm,
'drop_tokens_threshold': 0,
'num_typos': 0,
'prefix': true,
'filter_by': filterBy,
'sort_by': sortBy,
'query_by': query_by,
'vector_query': vector_query,
"rerank_hybrid_matches": true,
'exclude_fields': 'embedding',
'prioritize_num_matching_fields': false,
'per_page': perPage,
'page': pageNum
}
...
{
"symbols_to_index": ["+", "/"],
"token_separators": ["/", "-", "|"],
"enable_nested_fields": true,
"fields": [
{
"name": "title",
"type": "string"
},
{
"name": "content_ind",
"type": "string"
},
{
"name": "embedding",
"type": "float[]",
"embed": {
"from": [
"title",
"content_ind"
],
"model_config": {
"model_name": "ts/jina-embeddings-v2-base-en"
}
}
},
...
"search-as-you-type" not used - user should type a query in the query field (this goes in into searchTerm
and into q
) and press Enter. No special widget used, no InstantSearch.js, pure JS implementation calling "typesense" lib: ...documents().search( tsSearhParams )
User can select some filters in some dropdowns, can change sort order -> this changes filterBy
, sortBy
variables.
User can select one of semantic search
, keyword search
, hybrid search
in the UI -> this changes query_by
and vector_query
variables.
And, to explain "query language" I wrote this end-user help text:
Use "*" (wildcard operator) as the search string to return all elements.
Surround words with double quotes to do an exact phrase search. This works in "Hybrid search" and in "Keyword search" mode.
To exclude words in your query explicitly, prefix the word with the - operator. This works in "Hybrid search" and in "Keyword search" mode.
QUESTION: am I missing something? Is it a correct description ? Some other tricks?
I think that "query language" changes depending on SearchParams ( Semantic search vs Keyword search query language?) and collection Schema. Would be great to have some explanation of this. Prodably - some kind of
function generateQueryLanguageHelpString( SearchParams, Schema )
Fanis Tharropoulos
08/18/2025, 9:19 AMnew_in_town
08/18/2025, 10:59 AM