Rena Thomas
08/05/2025, 6:53 PMhighlight_full_fields
parameter for both
• Same search configuration pattern for both collections
Working (Both Local & Production):
// Research collection - highlights work everywhere
const researchParams = {
collection: "research",
query_by: "name,tags,fullText,embedding",
highlight_full_fields: "name",
// ... other params
};
Not Working (Local works, Production doesn't):
// Notes collection - highlights work locally but not in production
const notesParams = {
collection: "notes",
query_by: "title,tags,content,embedding",
highlight_full_fields: "title",
// ... other params
};
Expected Response (Notes - Local):
{
"hits": [
{
"document": {
"id": "note-123",
"title": "Market Analysis Report"
},
"highlights": [
{
"field": "title",
"matched_tokens": [
"Market",
"Analysis"
],
"snippet": "<mark>Market</mark> <mark>Analysis</mark> Report"
}
]
}
]
}
Actual Response (Notes - Production):
{
"hits": [
{
"document": {
"id": "note-123",
"title": "Market Analysis Report"
},
"highlights": [] // Empty array
}
]
}
Key Observations:
✅Same Firestore database in both environments
✅ Research collection highlights work in both environments
✅ Notes collection highlights work locally
❌ Notes collection highlights fail in production
✅ Both collections return search results correctly
✅ Same Typesense configuration and version
Questions:
• Could this be related to how the notes collection was indexed in production vs local Typesense instances?
• Are there any environment-specific Typesense configurations that could affect highlighting for specific collections?
• Could there be differences in the notes collection schema or indexing between the two Typesense instances?
• Are there any known issues with highlight_full_fields
on certain field types when using different Typesense instances?
The fact that both environments use the same data source but have different highlighting behavior suggests it's a Typesense indexing or configuration issue specific to the notes collection. Any insights would be helpful!Fanis Tharropoulos
08/06/2025, 10:35 AMRena Thomas
08/06/2025, 10:56 AM{
"searches": [
{
"include_fields": "id,title,topic,publishedAt,slug",
"q": "test",
"page": 1,
"collection": "notes",
"query_by": "title",
"sort_by": "publishedAt:desc,_text_match:desc",
"per_page": 100,
"highlight_full_fields": "title"
},
{
"include_fields": "id,title,topic,publishedAt,slug",
"q": "test",
"page": 1,
"collection": "notes",
"query_by": "title,tags,content,embedding",
"sort_by": "publishedAt:desc,_text_match:desc,_vector_distance:asc",
"query_by_weights": "10,2,1,5",
"per_page": 30,
"highlight_full_fields": "title",
"vector_query": "embedding:([], distance_threshold:0.15)"
}
]
}
• Deployed site(Dev Portal)
Request URL: https://tdlkwpms10oc6e84p-1.a1.typesense.net/multi_search
Payload:
{
"searches": [
{
"include_fields": "id,title,topic,publishedAt,slug",
"q": "test",
"page": 1,
"collection": "notes",
"query_by": "title",
"sort_by": "publishedAt:desc,_text_match:desc",
"per_page": 100,
"highlight_full_fields": "title"
},
{
"include_fields": "id,title,topic,publishedAt,slug",
"q": "test",
"page": 1,
"collection": "notes",
"query_by": "title,tags,content,embedding",
"sort_by": "publishedAt:desc,_text_match:desc,_vector_distance:asc",
"query_by_weights": "10,2,1,5",
"per_page": 30,
"highlight_full_fields": "title",
"vector_query": "embedding:([], distance_threshold:0.15)"
}
]
}
Rena Thomas
08/06/2025, 12:27 PMFanis Tharropoulos
08/06/2025, 2:57 PMRena Thomas
08/06/2025, 3:00 PMFanis Tharropoulos
08/06/2025, 3:01 PMRena Thomas
08/06/2025, 3:02 PMRena Thomas
08/06/2025, 3:03 PMRena Thomas
08/06/2025, 3:03 PMRena Thomas
08/07/2025, 12:58 AMFanis Tharropoulos
08/07/2025, 9:14 AM