blast icon indicating copy to clipboard operation
blast copied to clipboard

great work! can you rewrite boltdb backend to use redis?

Open hiqbn opened this issue 6 years ago • 8 comments

Instead of keeping two databases of bolt and redis, possible to rewrite backend as redis? there's interface store. hope you can help

hiqbn avatar May 22 '19 01:05 hiqbn

Hi @hiqbn , It's an interesting idea, but now I'm working on something else. After that, I will try to develop a plugin that supports Redis experimentally if I have time.

mosuka avatar May 23 '19 23:05 mosuka

can you help start something? i will help write the redis part. i have no idea how to do the connector.

hiqbn avatar May 24 '19 01:05 hiqbn

using it with https://github.com/yongman/tidis as backend

hiqbn avatar May 24 '19 01:05 hiqbn

Hello @hiqbn, This is an example of Bleve storage plugin for Badger. https://github.com/mosuka/bbadger

Please contact me when finished. I'll add your plug-in to Blast build option.

mosuka avatar May 24 '19 03:05 mosuka

i'll work on it but if u can do the initial redis connector will be best. it's good work what u have done. thx

hiqbn avatar May 24 '19 05:05 hiqbn

I don't understand the mo store.MergeOperator

can you do a boiler plate for me to work on the rest?

hiqbn avatar May 24 '19 11:05 hiqbn

redis does not need file to have mutex r/w lock. no idea how to write it without file accessed, i'm getting this error below:

i think it's easier modifying this https://github.com/tukdesk/bleve-ledisdb-storage but a few functions are missing. can you check?

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x846705]

goroutine 1 [running]: github.com/blevesearch/bleve.(*indexImpl).Index(0x0, 0xa21101, 0x6, 0x94a3a0, 0xab4830, 0x0, 0x0) /go/src/github.com/blevesearch/bleve/index_impl.go:245 +0x45 main.main()

hiqbn avatar May 25 '19 07:05 hiqbn

this is the boilerplate for redis for your reference https://github.com/mwmahlberg/bleve/tree/feature/kvredis/index/store/redis

hiqbn avatar May 26 '19 01:05 hiqbn