I have a book of 300000+ words.
Each word has metadata (grammatical information; parsing details and lemmas [root forms])
What is the best way to structure the data so that I can search for words or groups of words and get results fast. I would like to be able to search with requirements on the metadata as well.
I need to be able to search exact phrases or just words that are near one another.
My question is with regards to database design and querying method.