This repository was archived by the owner on May 12, 2021. It is now read-only.
LUCY-284 Support Go host types as doc#21
Merged
asfgit merged 8 commits intoapache:masterfrom Oct 1, 2015
Merged
Conversation
Add `NewHitDoc`, move `NewDoc`.
Instead of storing a pointer to a raw Clownfish Hash in a doc object,
wrap the Hash in a Go struct, store it in the registry and store the
ID returned by the registry in the Doc.
This commit is a transition from using a Clownfish Hash as Doc's fields
to using a Go `map[string]interface{}`.
Change from Clownfish Hash to Go map.
* Doc object
* Go struct
* map[string]interface{}
Prepare to read into something other than a Doc object from DefaultDocReader.
Make it possible to supply multiple types to DocReader.
Support multiple document types when fetching document data via a Searcher.
Allow 3 different types of object to retrieve fields via Next()
* Go struct
* Lucy HitDoc
* map[string]interface{}
asfgit
pushed a commit
that referenced
this pull request
Oct 1, 2015
It is convenient to be able to use host data types as documents, as they
fit more easily into host idioms than Doc objects. The primary routines
which need to support such types are Indexer's AddDoc() and Hit's
Next(), but it also makes sense to use a Go type internally within Doc.
The three types supported as documents are:
* Doc objects (within their Go struct wrappers)
* Go structs (field names mapped case-insensitively)
* Go `map[string]interface{}`
This closes #21.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support the following types as documents in Go bindings:
map[string]interface{}