Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

how can i use rediSQL to save a picture to redis #105

Closed
mengpengfei opened this issue Aug 3, 2020 · 6 comments
Closed

how can i use rediSQL to save a picture to redis #105

mengpengfei opened this issue Aug 3, 2020 · 6 comments

Comments

@mengpengfei
Copy link

mengpengfei commented Aug 3, 2020

i am very exited for your work,and i have read all the document of rediSQL。
but i have three questions。
how can i use rediSQL to save a picture to redis?
do the full text search of rediSQL support chinese?
what is the Tokenizer of the full text search of rediSQL?
please help me

@siscia
Copy link
Collaborator

siscia commented Aug 3, 2020

Hello!

Thanks for being so interested in the project, unfortunately this week I am out of office so I won't be able to help much.

RediSQL is based on SQLite!

For pictures. While SQLite supports binary blobs, this is not true for the Redis protocol mechanism. Your safest choice is to serialised the image as base64 and save it as a string. It is not perfect but will work up to a very reasonable number of queries.

For Chinese. I don't know! Both fts3 and fts5 are supported.

I will suggest to look into the official SQLite documentation.

In particular this link here: https://www.sqlite.org/fts5.html

I also look into this link that unfortunately does not seems promising:
https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg112010.html

Cheers

@mengpengfei
Copy link
Author

thank you very much
i have some other questions,can you help me?
#83 (comment)

@mengpengfei
Copy link
Author

when is the cache query results expired?

@siscia
Copy link
Collaborator

siscia commented Aug 12, 2020

Hi there,

still working through a backlog from vacation! Sorry for late reply.

when is the cache query results expired?

What you mean? What cache?

@mengpengfei
Copy link
Author

RediSQL can store results of queries into a Redis Streams.
do the results of queries in redis have expire time?

@siscia
Copy link
Collaborator

siscia commented Aug 12, 2020

No, it just push them into a redis stream.

Then how you use the stream is up to you.

You can keep it there, you can delete them after you read it.

RediSQL just push them!

Does this model works for you?

@siscia siscia closed this as completed Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants