Data
~5M documents, would love to have ~223M, with the text of ~10-1000 words each. It must be utf8 and support any spoken language. All words in a text are unique and I can also order them or do whatever needed to have better performance. Full text is saved in another location. Data is almost read-only. For performance, I can generate data, add indexes and mark it as read-only.
Data structure:
{
id: 1,
reference_id: 1,
text: 'text of unique. 10-1000 words each ',
}
Requirements
- Results must come under 0.1s
Sample queries:
- find text with words: x or y or z
- find text with words: x and y and z
- would be great to find text with part of the word:
hous
would findhouse
,housing
etc.
Questions
- Is it possible to make it happen with MySQL/PostgreSQL?
- What database solutions you would offer?
- What config to look at?
- Index type?
- Query sample?
- Server requirements for RAM/HDD/CPU?
- Better more powerful machines or array of simpler?
FULLTEXT
has perhaps all of your requirements.