I am implementing a virtual file system. As part of it, i am trying to add the content based search feature to it. Basically content based search feature allows user to search for a "word" and the system returns all the file names which contain the "word" in their content. In my view trie would serve my purpose. But it is not space efficient and while constructing it, it seems i need to populate wit with all the words from the entire content. Please suggest me with a better get around solution.
Patricia tries could be a little more space efficient than the normal tries. Check if they might serve your purpose although I am not very sure.