I know MongoDB 2.6 enable text search feature by default,but it do not support Chinese.I want to ask is there a best way to achieve Chinese full text search.My environment is Ubuntu12.04+php5.3+MongoDB2.6+Apache2.2. Thanks in advance.
2 Answers
There's no specialized support for Chinese text search in MongoDB, in terms of things like segmentation algorithms, stemming, etc. There is a server ticket for better Chinese text search support that you can comment and vote on. However, note that full text search isn't a MongoDB core competency and it almost certainly never will be. If you have complex text search requirements (anything beyond simple keyword matching and scoring, really) the best option is to use a full-fledged full text search engine, like Solr, that will have comprehensive support for major world languages like Chinese.
1 Comment
Refer to the Mongo Doc language-analyzers), for now(Mongodb 4.2) Chinese full text index is not supported.
But you can pipline(mongo-connector) the text to a search engine like solr and elasticsearch which support full text search on Chinese.
Refer to Indexing MongoDB with ElasticSearch