Ahamed Asif
08/14/2025, 12:14 PMJeremy Veto
08/14/2025, 4:53 PMnew_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 )
Diego Chacón Sanchiz
08/18/2025, 9:17 AMNicolas
08/18/2025, 12:34 PMJack Driscoll
08/18/2025, 7:43 PMAshutosh Thakur
08/19/2025, 9:46 AMAhamed Asif
08/19/2025, 11:55 AMHamp Goodwin
08/19/2025, 7:04 PMKarel du Preez
08/20/2025, 6:21 AMMarri Shiva
08/20/2025, 8:51 AMmulti_search
endpoint) and noticed that the exclude_fields
parameter does not seem to work as expected.
For example, here’s my search payload:
{
"searches": [
{
"collection": "qa-products",
"q": "*",
"query_by": "pName,pAlias,pBrand,CardType,sName",
"exclude_fields": "pPrice",
"facet_by": "CardType,pBrand,sID",
"page": 1,
"per_page": 250,
"sort_by": "AttribRank:asc,pGroup:asc,pGroupItemDate:desc",
"filter_by": "(sID:=[0cppGlK500aS1000000])&&(pActive:=[true])&&(pVisibility:=[true])&&(SAC_Activated:=[true])&&(pAttribStatus:=[Active])"
}
]
}
Even though I’ve specified exclude_fields: "pPrice"
, the pPrice
field still appears in the hits
response.
When I switch to include_fields
, it works correctly and hides the fields I don’t want.
Is this a known issue or limitation with exclude_fields
(especially in multi-search)?
If so, is there a recommended workaround or plan to fix it in future releases?Gauthier PLM
08/20/2025, 9:08 AMthematics.label
, but since I provide the whole object and not the index, it does not seem to be properly indexed.
I have done a similar thing on another object, where instead of being optional, the field is mandatory, and typesense did not accept the data, complaining that <field>.label
is missing.
this is the company I have:
{
name: "companies",
fields: [
{
name: "id",
type: "string",
index: false,
},
{
name: "name",
type: "string",
infix: true,
stem: true,
},
{
name: "logo_id",
type: "string",
optional: true,
index: false,
},
{
name: "thematics.label",
type: "string[]",
facet: true,
optional: true,
},
{
name: "segments.label",
type: "string[]",
facet: true,
optional: true,
},
{
name: "location",
type: "string",
facet: true,
optional: true,
},
{
name: "ownership",
type: "string",
facet: true,
optional: true,
},
{
name: "restricted_users",
type: "string[]",
optional: true,
},
],
enable_nested_fields: false,
}
And a payload example:
[
{
"id": "019685f4-cabb-a16e-c35d-c61f153767bf",
"name": "Atlantica Digital",
"logo_id": "companies/rec3SnmvjJJRERSIw",
"thematics": [{"id": 1330, "type": "THEMATIC_V2", "label": "Professional & IT services", "order": "c0AW"}, {"id": 1333, "type": "THEMATIC_V2", "label": "Niche Verticals", "order": "c0AZ"}, {"id": 1338, "type": "THEMATIC_V2", "label": "Cybersecurity", "order": "c0Ae"}],
"segments": [{"id": 1461, "type": "SEGMENT_V2", "label": "System Integrator", "order": "c0B0"}, {"id": 1487, "type": "SEGMENT_V2", "label": "Telecommunication", "order": "c0BQ"}],
"location": "Italy",
"ownership": "PE Owned",
"restricted_users": null
}
]
Gauthier PLM
08/20/2025, 9:10 AMnew_in_town
08/20/2025, 10:32 AMcontent
is a screen-long text about everything and anything. tags
is about 3 to 20 words, something like "Mozart, Bach" or "Deep Purple, Rainbow". Only music genres extracted from content.
Imagine, I have embedding_content
, embedding_tags
for both fields - I can have more than one embedding per document, right?
Now, for a document X
I want to find documents with similar music genres (NOT documents having similar fluff in content)
can I do something like this?
curl '<http://localhost:8108/multi_search>' \
-X POST \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-d '{
"searches": [
{
"collection": "docs",
"q": "*",
"vector_query": "embedding_tags:([], id: X)"
}
]
}'
Joe Woodhead
08/20/2025, 1:53 PMFederico Villa
08/20/2025, 2:48 PMtypesense-instantsearch-adapter
from v2.8.0
to v2.9.0
, and started seeing a lot of multi_search
requests firing up - We haven't changed the application code, just a version upgrade.
We are using: react-instantsearch-dom v6.40.4
with Higher Order components. Is the adapter version 2.9.0
compatible with the specified react-instantsearch-dom
library? if not, would upgrading it to the latest version help here?Malik
08/21/2025, 4:06 AMAbdul Halim Rafi
08/21/2025, 8:59 AMRequestMalformed: Request failed with HTTP code 400 | Server said: Prefix search is not supported for remote embedders. Please set `prefix=false` as an additional search parameter to disable prefix searching
Setting prefix=false
did work. But we are loosing some basic semantic search. eg.
Keyword Apple
doesn't work where the content has this kind of matching ... Apple's ...
. So, it's missing documents where it has and single quote. But, without the vector search it works.
Asking for suggestions and help on how can we take the best of Hybrid search.
Thanks 🙏Hari Naga Pandia Rajan .D
08/21/2025, 9:00 AM[]
). The data loads correctly, but before moving forward, I wanted to check:
• Does Typesense support filtering on stringified arrays ([]
) in cascading filters?
• Will it behave the same as flat JSON structures when used with the InstantSearch frontend service?
Also, since the performance is slowing down with each selection in the frontend, are there any suggestions or best practices to handle such a large dataset more efficiently? Any recommendations to improve speed and responsiveness would be greatly appreciated.Jesper Møjbæk
08/21/2025, 11:13 AMStan Fieuws
08/21/2025, 12:38 PMDave
08/21/2025, 8:00 PMLilly Jeba
08/22/2025, 6:00 AMMake: Aion
should restrict Model
to only those related to Aion like Model: SS
, and further restrict Model Year
to only valid years like 2017
, and so on.
Initially, we solved this by flattening all possible combinations per idea into separate records — for example:
{
"make": "Aion",
"model": "SS",
"modelyear": "2017",
"variant": "Knight Edition",
"powertrain": "Hybrid",
"projectcode": "JUN23V1"
}
But this leads to combinatorial explosion. Just 80 ideas generate 8 million records due to all the nested combinations. At scale (e.g., 500+ ideas), this becomes unmanageable in terms of performance and indexing time.
To solve this, we changed the data structure to store each field as an array (stringified or native), like this:
"projects": [
{
"attribute_make": "xxxxx",
"attribute_model": "xxx",
"attribute_modelYear": "2023",
"whereapplied": "Eureka Benchmark Set"
},
{
"attribute_make": "xxxxx",
"attribute_model": "xxx",
"attribute_modelYear": "2021",
"whereapplied": "Idea applies"
}
],
This reduced the number of documents significantly and indexing works fine. However, we now face a problem: cascading filters stop working. For example, when filtering on make: Aion
, the model
facet still shows unrelated models like Dolphin
or Test_001
. Even in the Typesense Dashboard, the facet_by
results don’t reflect correct cascading behavior.
❓ Our core question:
Does Typesense fully support filtering on array fields ([]
) in a way that preserves correct interdependent facet values for cascading filters?
Or is full flattening of data (with one combination per record) still the only way to get cascading filter behavior working properly?
Given our scale, flattening leads to massive performance and UX problems. We’re looking for the best practice or architectural guidance for handling complex facet relationships in a scalable and performant way using Typesense + InstantSearch.
Any recommendations or proven approaches would be really appreciated!Ahamed Asif
08/22/2025, 6:12 AMVictor
08/22/2025, 9:04 AMauto_gallery_pk_sequence_id
value for doc 5318541
.`
The relevant parts of the schema are:
schema "foo":
{
name: "auto_gallery_pk",
type: "string",
optional: true,
reference: "gallery.id",
async_reference: true
}
schema "gallery":
{name: "pk", type: "int64"}
Am I missing anything obvious? or any idea what to do about this? Unfortunately I couldn't find a way of replicating locallyLi Yuxuan
08/22/2025, 10:12 AM[
{
screenId: "screen_a",
ui_elements: [
{
groupId: "group:button:1",
class: "button",
},
{
groupId: "group:button:1",
class: "button",
},
{
groupId: "group:icon:1",
class: "icon",
},
],
embedding: [...]
},
{
screenId: "screen_b",
ui_elements: [
{
groupId: "group:button:1",
class: "button",
},
{
groupId: "group:icon:1",
class: "icon",
},
],
embedding: [...]
},
{
screenId: "screen_c",
ui_elements: [
{
groupId: "group:button:1",
class: "button",
},
{
groupId: "group:button:2",
class: "button",
},
{
groupId: "group:icon:1",
class: "icon",
},
],
embedding: [...]
},
{
screenId: "screen_d",
ui_elements: [
{
groupId: "group:icon:1",
class: "icon",
},
],
embedding: [...]
},
];
Can I search for documents that:
• contain both button
& icon
• and in my search results, screen_a
and screen_b
are de-duplicated to only show 1 (since they both contain the same type of elements)
I'm thinking of using embedding
field as you can see above, to be used to de-duplicate similar screens instead of based on the element groupings, is that possible with TypeSense APIs? 🙏Nayan Chhabhaiya
08/22/2025, 12:16 PMOllie J
08/22/2025, 5:06 PMOllie J
08/22/2025, 5:10 PMShawn Tan
08/22/2025, 5:13 PM