Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for search API #14

Open
drborges opened this issue Jun 7, 2015 · 0 comments
Open

Add support for search API #14

drborges opened this issue Jun 7, 2015 · 0 comments

Comments

@drborges
Copy link
Owner

drborges commented Jun 7, 2015

type Tag struct {
  db.Model     `search:"tags" db:"Tags" `
  Name  string `search:"name" db:"id"`
  Owner string `search:"-"`
}

The presence of search tag in any of the struct fields should cause a document to be created with all the fields tagged with search and its id becomes the datastore key used for the given model.

Tagging db.Model with search can be used to override the index name created for the given model.

Any indexing process should happen asynchronously.

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

No branches or pull requests

1 participant