Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example #2

Open
ghost opened this issue Nov 3, 2018 · 10 comments
Open

example #2

ghost opened this issue Nov 3, 2018 · 10 comments

Comments

@ghost
Copy link

ghost commented Nov 3, 2018

could you add a reasonable full example please ?

@alash3al
Copy link
Owner

alash3al commented Nov 3, 2018

There is no example needed for that, you must know blevesearch to get started.

@ghost
Copy link
Author

ghost commented Nov 3, 2018

I have used bleve for a project and know it reasonably well.
The reason i asked is because i want to fork this https://github.com/mosuka/blast, and add yours into it.

@ghost
Copy link
Author

ghost commented Nov 3, 2018

Blast essentially makes bleve a HA cluster.

@alash3al
Copy link
Owner

alash3al commented Nov 3, 2018

There is no special operation needed, here is an example that is the same as the official bleve documentation

package main

import (
	"fmt"

	"github.com/alash3al/bbadger"
	"github.com/blevesearch/bleve"
)

func main() {
    // create/open bleveIndex
    index, err := bbadger.BleveIndex("/tmp/badger/indexName", bleve.NewIndexMapping())

    // index some data
    err = index.Index(identifier, your_data)

    // search for some text
    query := bleve.NewMatchQuery("text")
    search := bleve.NewSearchRequest(query)
    searchResults, err := index.Search(search)
}

@ghost
Copy link
Author

ghost commented Nov 3, 2018

thanks. Ok i will give it a whirl to merge the two.

Are you planning to add more to yours ?

@alash3al
Copy link
Owner

alash3al commented Nov 3, 2018

More like what? if you have any thoughts, just tell me

@ghost
Copy link
Author

ghost commented Nov 3, 2018

gthere was a major issue with using badger with bleve until recently regarding snapshots. I can drag up the github issue if you want, but have to checked its working ok ? For background the main dev at dgraph made a change to the snapshotting that allowed bleve to work with badger.

also have you run this in prod and data race tested it all all ?

@alash3al
Copy link
Owner

alash3al commented Nov 3, 2018

I tried to run the test cases of the original package including the ReaderIsolation and it succeeded, it will be perfect if any dgraph/bleve developer can help and confirm this too.

@ghost
Copy link
Author

ghost commented Nov 4, 2018

thanks. that does address the main concern i had.
I will see how much i can do but i don't have much bandwidth to spare right now.

If you really want bleve devs to dog food this then post on bleve issues directly. I think it would be welcomed.
The original badger issue inside the bleve repo: blevesearch/bleve#591

@ghost
Copy link
Author

ghost commented Nov 4, 2018

I added to the bleve / badger issue over at the blast repo at:
mosuka/blast#17

Matching blast with bbadger is the best outcome for scaling as it utilises alias and computation spread and HA all in one hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant