问题
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