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

guidance on generating index mapping? #4

Closed fils closed 6 years ago

fils commented 6 years ago

Thanks for the previous help... I've come back to playing with this and have a question or two if you have time.

1) I've generated a simple Dockerfile and docker-ized blast https://github.com/earthcubearchitecture-project418/garden/tree/master/newindex/Blast

2) I've not included any of the config files in this container.. though I don't know yet what is default in the Go code... though I did go through it. I've using Bleve as well in my code at https://github.com/earthcubearchitecture-project418/gleaner but not with the sophistication you are. :)

3) I've been playing with loading schema.org JSON-LD (type Dataset) into Blast and trying to search (docs at https://github.com/earthcubearchitecture-project418/garden/tree/master/newindex/Blast/examples ) where sodataset.json is a JSON-LD doc wrapper with the

{
    "id": "1",
    "fields": {

I think they need ??

My question is this:

If one wanted to leverage Blast for other JSON documents, what are the basic steps needed?
I was curious why my test failed since I thought that Bleve instance in Blast would simply use the

indexMapping := bleve.NewIndexMapping()

as default an give me simple default index of the JSON structure. My plan was to build out a more focused mapping from there. However, that doesn't even seem to work since when I load the document and search for exact matches of known words in the document I get nothing. I am wondering if it is trying to force my document into a mapping that it does not fit, resulting in no search results.

In the process

cat example/sodataset.json | xargs -0 ./bin/blast put document --request

./bin/blast get document --id 1

cat search_requestv2.json | xargs -0 ~/src/git/blast/bin/blast search --request > ../searchoutput.json

The first two work fine, I can load and retrieve the document. I am not able to structure a valid search with either of the search request documents inside https://github.com/earthcubearchitecture-project418/garden/tree/master/newindex/Blast/examples

Any guidance appreciated!

Thanks Doug

fils commented 6 years ago

The issue looks to be mine..
I'll close the issue......