mosuka / blast

Blast is a full text search and indexing server, written in Go, built on top of Bleve.
Apache License 2.0
1.08k stars 76 forks source link

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

Open hiqbn opened 5 years ago

hiqbn commented 5 years ago

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

mosuka commented 5 years ago

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.

hiqbn commented 5 years ago

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

hiqbn commented 5 years ago

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

mosuka commented 5 years ago

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.

hiqbn commented 5 years ago

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 commented 5 years ago

I don't understand the mo store.MergeOperator

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

hiqbn commented 5 years ago

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 commented 5 years ago

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