Are the Mongodb full-text index settings reasonable?
为情所困
为情所困 2017-05-31 10:35:52
0
1
777

The amount of data is one million, not too big. There is a field with a value length > 100, which is very long, including Chinese, English, and almost all characters. Full-text indexing is used, but it is not ideal:

1, the search is extremely slow, even using the index.

db.tests.find({'$text':{'$search':'test'}})

2, when searching for '', although it will be converted to '\', there will be no reflection, as if it is not running at all. Repeatedly exit, reopen (referring to the customer's mongo), and query again. It will fill up the memory (12G, except the system can use 11G) and freeze directly. Hard reboot.

db.tests.find({'$text':{'$search':'test.06'}}) #想要的。
但是通过web输入会变成
db.tests.find({'$text':{'$search':'test\1.06'}})

I don’t know if this kind of requirement is suitable for building an index?
Thanks

为情所困
为情所困

reply all(1)
小葫芦

It is currently recommended to use a specialized search engine for full-text indexing. Although MongoDB supports full-text indexing, its functions are not very rich, the usage scenarios are limited, and there are problems in many cases, so it is not recommended.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!