Optimizing Schema and Reducing Memory Usage
TLDR Shaun faced issues with memory usage when adding a new field to a schema. Kishore Nallan advised optimizing the schema by disabling unnecessary facets and sorting options to reduce memory usage.
Jun 20, 2023 (3 months ago)
Shaun
07:27 AMKishore Nallan
07:28 AMShaun
07:33 AMShaun
07:33 AMShaun
07:33 AMShaun
07:34 AMShaun
07:34 AMKishore Nallan
07:34 AMShaun
07:35 AMKishore Nallan
07:38 AMShaun
07:40 AMShaun
07:41 AMShaun
07:41 AMShaun
07:41 AMShaun
07:41 AMKishore Nallan
07:41 AMShaun
07:42 AMShaun
07:42 AMuserId
if we just want to do exact match on that ID being found, we would need to have facet:true
on it? Or facet:false
will still be ok ?Kishore Nallan
07:44 AMKishore Nallan
07:44 AMShaun
07:45 AMShaun
07:45 AMShaun
07:45 AMfacet:true
for like verified
and deleted
flagsShaun
07:46 AMShaun
07:46 AMShaun
07:46 AMdeleted=false
etcKishore Nallan
07:49 AMShaun
07:49 AMShaun
07:49 AMKishore Nallan
07:50 AMShaun
07:50 AMShaun
07:50 AMShaun
07:50 AMShaun
07:50 AMShaun
07:55 AM {
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "deleted",
"optional": false,
"sort": false,
"type": "bool"
}
Shaun
07:56 AMShaun
07:56 AMShaun
07:56 AMKishore Nallan
07:56 AMShaun
07:56 AMShaun
07:57 AMShaun
08:03 AMsort:true
make much difference to memory usage? I take it that if this is false you cant sort by that field, except it seems to make it true by default for all fieldsKishore Nallan
08:04 AMKishore Nallan
08:04 AMShaun
08:04 AMShaun
08:04 AMShaun
08:04 AMShaun
08:04 AMKishore Nallan
08:04 AMShaun
08:05 AMShaun
08:07 AMKishore Nallan
08:19 AMShaun
08:19 AMShaun
08:19 AMShaun
08:19 AMJun 21, 2023 (3 months ago)
Gustavo
02:05 AMfacet: true
then?https://typesense-community.slack.com/archives/C01P749MET0/p1687247364672419?thread_ts=1687246059.709859&cid=C01P749MET0
Typesense
Indexed 2776 threads (79% resolved)
Similar Threads
Discussions on Typesense, Collections, and Dynamic Fields
Tugay shares plans to use Typesense for their SaaS platform and asks about collection sizes and sharding. Jason clarifies Typesense's capabilities and shares a beta feature. They discuss using unique collections per customer and new improvements. Kishore Nallan and Gabe comment on threading and data protection respectively.
Adding New Fields to Items in Typesense Without Wiping Data
Alex wanted to add more fields to their Typesense items without wiping data. Kishore Nallan explained they had to create a new collection instead, and suggested using automatic schema detection for future changes. They also discussed potential downsides of indexing every field.
Slow, High CPU Write Operations After Collection Drop in Typesense
Himank discussed an issue in Typesense where deleting and recreating a collection led to slow write operations and high CPU usage. Kishore Nallan suggested using an alias to avoid this issue. Numerous tests and debugging was conducted as pboros contributed with local testing. Kishore Nallan aimed to start implementing a range delete and full db compaction after deletion to potentially solve the issue.
Querying with Typesense-Js and Handling Null Values
michtio was querying using typesense-js and receiving fewer results than expected. Kishore Nallan suggested using different query parameters. Further discussion led to the handling of 'null' values and filtering syntax in the search queries. The thread ended with Jason offering migration support from Algolia to Typesense.
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.