Methods for Fetching, Querying, and Modifying Collections in Typesense
TLDR Bill inquired about performing OR queries, querying empty arrays and modifying collections in Typesense. Kishore Nallan explained the current limitations and provided workarounds and recommendations for each case. The conversation also touched upon the usage of cache in Typesense and the workings of the _eval function.
4
1
Jan 25, 2023 (8 months ago)
Bill
11:40 PMJan 26, 2023 (8 months ago)
Kishore Nallan
04:56 PMBill
04:57 PMKishore Nallan
05:02 PM1
Jan 27, 2023 (8 months ago)
Bill
12:23 PMKishore Nallan
12:26 PMcache_ttl
which indicates how long the cached results should be kept before being evicted. It's a LRU cache, so memory used is finite. Not possible to change the cache entries size of 100 at the moment.Bill
12:28 PMJan 28, 2023 (8 months ago)
Bill
12:01 PMKishore Nallan
12:10 PMBill
12:11 PMKishore Nallan
12:35 PMBill
12:39 PMpublished
has been declared as a default sorting field, but is not found in the documents already present in the collection. If you still want to add this field, set it as optional: true
.Bill
12:40 PMBill
12:41 PMKishore Nallan
12:43 PMBill
12:43 PM"fields": [
{"name": "desc", "type": "string", "optional": true }
]
}
Bill
12:44 PMKishore Nallan
12:53 PMKishore Nallan
12:54 PMBill
12:57 PMKishore Nallan
12:58 PMBill
01:08 PMKishore Nallan
01:09 PMKishore Nallan
01:11 PMBill
01:21 PMBill
01:23 PMKishore Nallan
01:24 PMBill
01:31 PMKishore Nallan
01:36 PMsort_by: _text_match:desc
Kishore Nallan
01:36 PMBill
01:36 PMKishore Nallan
01:40 PMBill
01:44 PM1
Kishore Nallan
02:51 PMaction
mode are you using (e.g. emplace
or upsert
)?Bill
03:43 PMBill
07:16 PM1
Jan 31, 2023 (8 months ago)
Bill
09:31 PMFeb 01, 2023 (8 months ago)
Kishore Nallan
09:11 AMBill
12:06 PMKishore Nallan
12:35 PMBill
01:06 PMFeb 06, 2023 (8 months ago)
Kishore Nallan
02:45 PMEval computes a 1 or 0 for the sort clause. So it will prioritize those records whose expression is true above others. In filtering, those records for which the filter expression is 0 is not even returned.
Kishore Nallan
02:46 PMWhat do you expect and what do you get instead? Also post the full sort_by string you used.
Bill
02:57 PMBill
02:58 PMKishore Nallan
02:59 PMring
will not match hearing
because it just does "word contains"Kishore Nallan
03:00 PMq
does only prefix match, but matching ring
with hearing
is suffix match.Bill
03:01 PMBill
03:03 PMBill
03:04 PM1
Kishore Nallan
03:05 PMring
matches rin
in query because it supports fuzzy typo tolerance. With eval, it's a filter expression which doesn't support it (just like filter_by
doesn't)Bill
03:06 PM1
Typesense
Indexed 2776 threads (79% resolved)
Similar Threads
Docsearch Scrapper Metadata Configuration and Filter Problem
Marcos faced issues with Docsearch scrapper not adding metadata attributes and filtering out documents without content. Jason helped fix the issue by updating the scraper and providing filtering instructions.
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.
Handling Kinesis Stream Event Batching with Typesense
Dui had questions about how to handle Kinesis stream events with Typesense. Kishore Nallan suggested using upsert mode for creation/update and differentiating with logical deletion. After various discussions including identifying and resolving a bug, they finalized to introduce an `emplace` action in Typesense v0.23.
Threading Problem During Multiple Collection Creation and Batch Insertion in Typesense
Johan has a problem with creating multiple collections and batch-inserting documents into Typesense, which is returning results from different collections. Kishore Nallan helps troubleshoot the issue and suggests a potential local race condition, which is fixed in a later build.
Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.