简体   繁体   English

使用NodeJS进行全文搜索

[英]Full Text Search with NodeJS

I want to implete the full text search(FTS) queries in my node js application. 我想在我的node js应用程序中实现全文搜索(FTS)查询。 The database I am using is MySQL. 我正在使用的数据库是MySQL。 I know that MySQL does have inbuild support for FTS but sadly it does not support Singular/Plurals, Synonyms and Inflectional words. 我知道MySQL确实具有对FTS的内置支持,但遗憾的是它不支持单数/复数,同义词和屈折词。 There other FTS libraries available that can work with MySQl. 还有其他可以与MySQl一起使用的FTS库。 Following are the two I am interested in 以下是我感兴趣的两个

  • Lucene Lucene的
  • Sphinx Search 狮身人面像搜索

I am very much sure that Shpinx Search has npm package and can be used with node js. 我非常确定Shpinx Search具有npm软件包,并且可以与node js一起使用。 I am not sure if Lucene can be used with node js ? 我不确定Lucene是否可以与node js一起使用?

Please let me know if lucene can be used with node js if so provide the documentation for the same. 请让我知道Lucene是否可以与node js一起使用,如果有的话,请提供相应的文档。

Thanks ! 谢谢 !

You have several alternative like query-engine and several other tools available for Lucene. 您有多种选择,例如查询引擎和可用于Lucene的其他工具

Also, if you want to use FTS with node, you could have a look to Norch like suggest this answer on a look-alike topic . 另外,如果您想将FTS与node一起使用,则可以看看Norch,就像在类似主题上建议此答案一样

Best, 最好,

Maintainer of search-index and Norch here. search-indexNorch在这里。 They might be what you are looking for. 他们可能就是您想要的。 You can even use your MySQL database as a back end if you want. 如果需要,您甚至可以将MySQL数据库用作后端。

https://github.com/fergiemcdowall/search-index (the lib) https://github.com/fergiemcdowall/search-index(lib

https://github.com/fergiemcdowall/norch (the server) https://github.com/fergiemcdowall/norch (服务器)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM