I also need a similiar function, I was thinking of:
- putting everything to one document and manually searching for
something (memory limit? - for some reason no one gives an estimation
on a request's memory limit)
- searching every element one by one using background tasks
(expensive)
- combining idea 1 and 2
When I asked about this on IRC pfn recommended what nischalshetty
recommended
Pros:
- Very simple to implement
Cons:
- Deciding how deep the indexing will go (will you add each prefix?)
- Limited search
I am thinking of doing it like:
phrase: "the action game"
["the","action","game","the action","action game","the action game"]
it may also be every subsets which is 2^N, but I guess its a lot, so
continuous sequences sound better
I am definitely not diving into prefixes
Thinking about it now, continuous sequences up to length 2 is the way
to go for me
phrase: "very good game action"
["very","good","game","action","very good","good game","game action"]
and probably adding the whole thing too:
["very","good","game","action","very good","good game","game
action","very good game action"]