Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I'm not sure I understand the purpose of this. Can you please clarify? |
|
Hi, ContextNow, Orama uses tree structures to store strings and numbers. In particular, it uses radix trees and avl trees to store respectively strings and numbers. ProblemThe time insertion is high when the developer trying to insert more than 100k of documents. We uses trees because that structures have some guarantees like:
All those features are great for some kind of data:
All those searches (and others) are yet supported by Orama. Anyway, if I think generally a search, I'm thinking a search bar + filters. Meanwhile the search bar completely leverages on radix tree for typo tolerance for instance, the filters are typically implemented using two kind of interfaces:
For the first use case, we can leverage on avl because we need the comparators. SolutionI'm proposing a different approach to not keep the order for fields that doesn't require it. Like the example above, the user still want to filter on it with an exact match and without keeping an order.
Const:
The implementation is still in progress because I would like to understand if this makes sense before finalizing it. |
|
I see! |
|
Hi! |
|
Exactly, a new Index component that can replace the default one. This use-case is an example of the ratio behind Orama's architecture. |
|
What do you mean? I want to add this feature to the default index. |
|
I think that in order to keep Orama clean things should be separated. Nothing prevents you to implement the new feature as new index and then call within the default index. |
4789851 to
8fa6e3a
Compare
8fa6e3a to
6289b81
Compare
6289b81 to
70b86ed
Compare
70b86ed to
0ce6534
Compare
0ce6534 to
cfc7381
Compare
micheleriva
left a comment
There was a problem hiding this comment.
Looks good to me, just a couple of minor changes. Will approve once we also have documentation ready. Well done!
6cc8db0 to
0c949b2
Compare
micheleriva
left a comment
There was a problem hiding this comment.
I think it mostly looks good, except for a couple of small comments. @allevo please add tests for Enums for the plugin-data-persistence package as well.
Good to go as soon as these comments are addressed.
Terrific job 🔥
We collect some issues for our performance during the insertion. In particular, the number type has some problems if the number of documents is high. But also string can be slow too.
The issue related to the insertion time is because of the cost of keeping the order for the number. Trees allow us to keep order with the cost of O(log(N)) for insertion time. But what happens if we choose to lose the order to have a faster insertion time?
Depending on what you need, values can have a lot of meanings:
>,<,>=,<=,=,!=)=,in)This PR introduces the
enumtype to allow:=andinoperator (others??)What this PR misses:
FlatTreeproperly: used a discriminator stringenum[]as well: discarded for nowUsage: