How to access the value of matched documents

106 views
Skip to first unread message

Arihant Barjatya

unread,
Jan 10, 2024, 3:55:27 AM1/10/24
to bleve
I am saving words as documents and during search I am doing fuzzyquery . I need to access the word , but I am only able to get the id from it. How do I access the word in the most efficient way.

// type to save in index.
type data_object struct{
Id string
Keyword string
}

// how do i access all the keywords from the searchresult.
searchResult,err_search := index.Search(searchRequest)

Deepak Kar

unread,
Jan 17, 2025, 5:02:13 AMJan 17
to bleve
Setting the following field will return all fields for the matching document.
searchRequest.Fields = []string{"*"}
Reply all
Reply to author
Forward
0 new messages