Full text search engine for Python

女生的网名这么多〃 提交于 2019-11-29 09:43:05

问题


I'm searching for a Python full text search engine.

I took a look at PyLucense, but I think that using a Java-based library in a Python project is not good. As I understand, Sphinx does not have a Python API.

Any ideas ?


回答1:


Have you looked at Whoosh? It's pure Python.




回答2:


"Sphinx does not have a Python API"

is not true. Download the release and look at sphinx/api/sphinxapi.py

I use it myself and I'm pretty happy with it. The documentation is for PHP only but the Python API uses the exact same names for all functions.




回答3:


I will recommend whoosh. You can easy install it ie easy_install Whoosh It has a neat API too




回答4:


Apache Solr is Lucene-based and offers a REST/HTTP interface to its search functions, so you have no platform lock-in or language issues. IMO it is by far the best search server out there with more features than you can ever wish for and active community to support it.




回答5:


Particularly for full text search, Solr is an excellent choice. You will have a hard time finding a more widely used and more open choice. We use Solr/Lucene at my company with a PHP web application being the client and the HTTP/REST API to let you query the index. It has as much functionality as a native PHP client would have and much more flexibility out of the box. You can perform any query/filter you choose all using the REST API. But, on top of all of that, you get an extremely performant and widely used search system with built-in replication that is constantly being improved. Strongly recommend Solr 1.4.x as your starting point.




回答6:


Have you tried sqlite's FTS features? You used the sqlite tag but I see no mention of sqlite in your question.



来源:https://stackoverflow.com/questions/4297672/full-text-search-engine-for-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!