I have a list of items. Each item have various properties. Each item can be tagged, like tagging a post here. Right now, tags are represented using a
Tags property, that is a string and it looks like
A user can search for an item based on its tags (i.e. get me items that has
To do this I need to scan the full items list and, even worst I need to split the
Tags property and search if those tags are present.
What I'm searching for is a sort of hashing filter or a better algorithm to perform this type of search. Note that, if searching for
tag2 would mean give me items with just tag2 the search would be simpler, alas what this really means is give me items that contains tag2, so splitting (at least, for now) is mandatory.
We would change the representation from
tag1:tag2:...:tagN to a better one, in order to provide a faster search. Possibly without a lookup structure or something like that.