Documents in my database have names and descriptions among other fields. I would like to allow users to search for these documents by providing a few keywords. Keywords should be used to search both in the name and in the description field. I read the mongoDB full-text search documentation, and it looks very nice and simple if I want to search for keywords in the name field of my documents. However, the description field contains free-form text and can take up to 2,000 characters, so there may be several hundred words per document. I could treat them the same way as names, and just split the entire description into separate words and save it as another array similar to a tag (according to Mongo's example), but this seems like a terrible idea - each document size can be almost doubled, plus there are symbols such as periods, commas, etc.
I know that there are special solutions for such problems, and I just looked at Lucene.Net, I also saw what Sol mentioned here and there.
Should I look for an implementation of this search function in mongoDB or use a specialized solution? Currently, I have only one mongod instance and one web server instance. We may need to scale later, but for now that's all I use. I would appreciate any suggestions on how to implement this feature.
source
share