Updating Bulk Records and Resolving Typsense Issues.
TLDR Greg inquired about updating bulk records. Jason proposed using the documents/import endpoint for bulk updating, identified issues with Typesense, and provided solutions. Greg appreciated the assistance. Conversation related to the procedure was shared with Viktor.
5
1
1
1
Nov 17, 2022 (13 months ago)
Greg
10:59 PMJason
11:00 PMGreg
11:02 PMGreg
11:02 PMJason
11:03 PMGreg
11:03 PMGreg
11:04 PMGreg
11:04 PMJason
11:04 PMYup, you just want to make sure your client-side timeout is high as say 30 minutes, so it never timesout
Jason
11:05 PMYou can have Typesense use the ID you use in your database for each record, by sending the database ID in a field called
id
Jason
11:05 PMGreg
11:05 PMGreg
11:06 PMGreg
11:06 PMJason
11:06 PMGreg
11:07 PMJason
11:07 PMJason
11:07 PMGreg
11:08 PMGreg
11:08 PMJason
11:10 PMfilter_by
book_id parameter to just export the books you want, along with include_fields=id, to only export the Typesense IDs for each recordJason
11:10 PMGreg
11:10 PMJason
11:11 PMJason
11:11 PMGreg
11:11 PM1
Greg
11:19 PMGreg
11:19 PMconst currentDocuments = await typesenseClient
.collections(collectionId)
.documents()
.export({
filter_by: `mediaId:=${mediaId}`,
include_fields: ['id'],
});
Jason
11:20 PMinclude_fields: 'id'
(comma separated string instead of an array)Greg
11:21 PM1
Greg
11:38 PM{
code: 404,
document: '{"id":"2448","title":"AaA Prepare Ye a Highway"}',
error: 'Field `contributors` not found.',
success: false
}
Jason
11:39 PMaction=emplace
as a parameter to the import endpoint?Greg
11:39 PM{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "contributors",
"nested": true,
"nested_array": 2,
"optional": false,
"sort": false,
"type": "object"
}
Greg
11:39 PMJason
11:40 PMGreg
11:40 PMJason
11:41 PMGreg
11:43 PMGreg
11:45 PMJason
11:48 PM0.24.0.rcn27
… Can we try upgrading you to the latest RC? If the issue still persists there, we can take a closer lookGreg
11:49 PMGreg
11:49 PMJason
11:49 PM1
Jason
11:51 PMJason
11:52 PM0.24.0.rcn34
. Could you try now?Greg
11:53 PMGreg
11:53 PM1
Greg
11:56 PMJason
11:57 PMJason
11:58 PMGreg
11:58 PMJason
11:59 PMJason
11:59 PMNov 18, 2022 (13 months ago)
Greg
12:02 AM[
{ "id": "2352", "title": "AaA Prepare Ye a Highway" },
{ "id": "2353", "title": "AaA Prepare Ye a Highway" },
{ "id": "2354", "title": "AaA Prepare Ye a Highway" },
{ "id": "2355", "title": "AaA Prepare Ye a Highway" },
{ "id": "2356", "title": "AaA Prepare Ye a Highway" },
{ "id": "2357", "title": "AaA Prepare Ye a Highway" },
{ "id": "2358", "title": "AaA Prepare Ye a Highway" },
{ "id": "2359", "title": "AaA Prepare Ye a Highway" },
{ "id": "2360", "title": "AaA Prepare Ye a Highway" },
{ "id": "2361", "title": "AaA Prepare Ye a Highway" }
]
Is that enough?
Jason
12:02 AMJason
12:02 AMGreg
12:02 AMJason
12:03 AMGreg
12:03 AM1
Nov 20, 2022 (13 months ago)
Viktor
11:51 AMWould love to read the post
1
Nov 22, 2022 (13 months ago)
Jason
12:03 AM1
Nov 23, 2022 (13 months ago)
Viktor
05:34 PM1
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
Collating Search Results from Different Collections.
Patrick inquired about collating search results on different collections based on text_match value. Jason confirmed it's possible, but must be done client-side.
Collection-Level Scoring in Typesense Multi-Search
Mile questioned the possibility of collection-level scoring in Typesense. Jason advised adjusting scores client-side, and requested Mile to create a GitHub issue to assess community interest.
Merging and Ordering Multi-Search Results
Jack asked how to merge and order search results from different collections using the 'score' value. Kishore Nallan confirmed its use.
Understanding Rank Fusion Score in Typesense's Multi-Search
Ayush had queries about comparing `rank_fusion_score` across collections in Typesense's hybrid search. They were explained and clarified by Kishore Nallan on how the score works and how it could be manipulated for their use-case.
Reranking Search Results from Different Sources
Viktor seeks advice on reranking search results. Kishore Nallan suggests hybrid search and custom ranking algorithms. John recommends Metarank as a potential solution.