Using RethinkDB for "Full Text Search"

I am currently working on a web application where, ideally, I can maintain a search bar in documents to be stored for users. Each of these documents will be a small cut to a decent sized article. (I don't think any documents will be larger than a few kilobytes of text for search purposes.) Since I was reading about the correct ways to use RethinkDB, one of the bits of information that stuck as a concern for me is doing something like a filter on non-indexed data, where I saw people ticking off a few minutes spent in one of these calls. Considering that I expect at least 10,000 documents to be produced in the long run (and in fact for a long time, 100,000+, 1,000,000+, etc.), is there a way to search for these documents in a way,which has a snooze time (preferably within 10s of milliseconds) in the RethinkDB standard API? Or will I have to come up with a separate schema that allows quick searches through clever use of indexes? Or am I better off using another database that provides this capability?

+3


source to share


1 answer


If you are not using an index, your query will have to look at every document in your table, so it will slow down as your table grows. 10,000 documents should be reasonable to search on fast hardware, but you probably can't do it in 10 seconds of milliseconds, and millions of documents are likely to be slow to search.



You can look at elasticsearch for a way to do this: http://www.rethinkdb.com/docs/elasticsearch/

+3


source







All Articles