Skip to content

error fixing & add fields to ScoredDocument for SearchResponse#71

Open
rchardzhu wants to merge 2 commits intohuichen:masterfrom
rchardzhu:master
Open

error fixing & add fields to ScoredDocument for SearchResponse#71
rchardzhu wants to merge 2 commits intohuichen:masterfrom
rchardzhu:master

Conversation

@rchardzhu
Copy link

  1. fix error: not enough arguments in call to searcher.IndexDocument
  2. add fields to ScoredDocument for SearchResponse
    usage:
    i := 0
    for _, hit := range result.Docs {
    log.Println("id, score: ", hit.DocId, hit.Scores)
    var article Article
    json.Unmarshal(hit.Fields.([]byte), &article)
    log.Println("fileds: ", article)
    i++
    }

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

Successfully merging this pull request may close these issues.

1 participant