Full text search engine for Python

10,157

Solution 1

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

Solution 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.

Solution 3

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

Solution 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.

Solution 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.

Share:
10,157

Related videos on Youtube

uhbif19
Author by

uhbif19

Backend programmer. Use Scala/Lift and Python/Django. Also I write web-scrapers and another web-automatisation. Working as a freelancer for 2 years.

Updated on June 04, 2022

Comments

  • uhbif19
    uhbif19 almost 2 years

    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 ?

  • uhbif19
    uhbif19 over 13 years
    No i didn't try it. SQLAlchemy didn't support SQLite search, and i dont want use plait SQL-syntax.
  • Roger Binns
    Roger Binns over 13 years
    I'm a Python guy and even maintain a Python SQLite wrapper (APSW). For some work stuff I also use Solr. Configuration is a PITA but the search results are fantastic. You can get them back as JSON which makes life easy. You have to create the content via XML which is annoying. SQLite's FTS3 is nice too but nowhere near as flexible. For example stemming and metaphone are trivial with SOLR but very hard with FTS3.

Related