Marty,
So 4 months later and things have moved along with the effort I am involved with. I'm ready now to revisit this. I just used
mapping := bleve.NewIndexMapping()
index, err := bleve.New("csvw.bleve", mapping)
and then a
err = index.Index(item.URL, item)
Basically right of the example on
blevesearch.com. I indexed about 18K documents as a representation of the full document set.
I can do a simple search but I have a question with fuzzy search
I have
query := bleve.NewMatchQuery("JanusXrfSample")
search := bleve.NewSearchRequest(query)
searchResults, err := index.Search(search)
if err != nil {
fmt.Printf("this is error %v \n", err)
}
fmt.Printf("Results %v\n\n", searchResults)
// fuzzy search
fuzzyq := bleve.NewFuzzyQuery("JanusXrfSample")
fsearch := bleve.NewSearchRequest(fuzzyq)
fsearchResults, err := index.Search(fsearch)
if err != nil {
fmt.Printf("this is error %v \n", err)
}
fmt.Printf("Fuzzy Results %v\n\n", fsearchResults)
The Match query works fine locating the exact matches (48 of them). However, I get 0 results from the fuzzy search. Why would that be? If the fuzzy search is looking for things closely spelled to the search term wouldn't an exact spelling also work?
I'm interested in people being able to give me something like set of keywords, like: "Janus XRF" and then being able to get to this term. Also things like "Thermal Con" being able to match up to "Thermal Conductivity".
Questions...
1) Am I creating the index correctly or are there options I should be doing there to build a better index?
Thanks much for any time and guidance, I'm looking forward to diving to Bleve more now.
Take care
Doug