Replies: 1 comment 2 replies
-
Hi! I truly appreciate your extensive feedback 🙂 It really helps us grow and spot mistakes for real world use cases I'll quickly answer your questions:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The index for Dragonfly has been available since version 1.12. The following FT commands are currently available:
FT.CREATE, FT.SEARCH, FT.PROFILE, FT._LIST, FT.INFO, FT.DROPINDEX. This makes the index compatible with RediSearch.
Here are a few examples:
Create index:
Search or display index samples:
In principle, an index in Dragonfly enables something similar to what an SQL DB does with "SELECT * FROM search WHERE". The speed of creating the index is incredibly fast.
For example, if I create an index for our comments (1.5 million), it takes less than 11 seconds. Compared to Redis RediSearch with 5 minutes and 27 seconds for the same index (but with prefix/infix), this is really very good progress. A big thank you to @dranikpg and the dragonflyDB team.
Here is my feedback on version 1.12.1
1. Currently, the FT commands are not synchronized in a master/slave configuration. Is this intentional?
2. With the TAGs type, it seems to stop after 10 characters. This is how it works:
while
reports an error ((error) ERR Query syntax error). The 1234... are only meant as an example, these are keys that consist of numbers but are saved as strings. Current workaround: If you save it in "TEXT" instead of the type "TAG", i.e. "$.tags.* AS tags TEXT" then it works.
3. The "RETURN" syntax is slightly different from the original RediSearch.
You can write the following at Dragonfly:
FT.SEARCH search * RETURN 1 $.title as title
oderFT.SEARCH search * RETURN 1 $.title
Under "RediSearch" the count and the "$." work differently:
Here's how it works under RediSearch:
You don't need a "$." with the "title" if it's a json array. Or you have to set the count to 3 for it to work with "AS". I didn't quite understand that either. However, I think Dragonfly's solution is better. For compatibility, however, the "title" should also work without "$.".
4. FT.INFO search-index provides some information about the index.
Here the "SORTABLE" information is not yet displayed for the respective fields. Under RedSearch these are not called "fields" but "attributes". The information "index_definition" and the information about the total size of the index in MB would also be nice. All other values can be neglected for the time being. Here is an FT.INFO from RediSearch:
5. According to which sorting is the search result currently displayed? By any random order?
6. The log file often shows "doc_accessors.cc:177] Invalid Json path: $comment Syntax error" if the wrong "Json path" is used. Shouldn't this rather appear as the output of the corresponding wrong command? The CLI is then silent about the error.
7. Should index errors or features be entered individually or collectively in "Issue" in future or is it sufficient in the beta stage here in the forum?
Wishes:
Otherwise the index works absolutely stable. Since DragonflyDB created the index in a few seconds, I first thought it was an error and it wouldn't work. I was wrong, Dragonfly is just damn fast and the index works. Well done, keep up the good work! 👍
Frank
Beta Was this translation helpful? Give feedback.
All reactions