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

Store additional data #5

Open
nhaberl opened this issue Jun 14, 2020 · 0 comments
Open

Store additional data #5

nhaberl opened this issue Jun 14, 2020 · 0 comments

Comments

@nhaberl
Copy link

nhaberl commented Jun 14, 2020

It would be helpful if we could store additional data in relation to the term like an database id or similar.
Maybe there is an easier way but storing all terms inside an dictionary inside the trie (or maybe there is a whole set of all terms statically) would be a suggestion.

And is there a specific reason why the result tuple is not typed (a separate type). If it was maybe it makes sense to introduce also a generic result where T is the type which is added when indexing.

something like

AddTerm(string term, int weight, T data)

LookupResult results = Lookup(string term, int limit, int offset)
LookupResult results = Lookup(string term, int limit, int offset)

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