Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lucene / python

Tags:

python

lucene

Can I use lucene directly from python, preferably without using a binary module?

I am interested mainly in read access -- being able to perform queries from python over existing lucene indexes.

like image 940
Yoav Avatar asked Jul 12 '09 21:07

Yoav


People also ask

What is Lucene used for?

Lucene is a full-text search library in Java which makes it easy to add search functionality to an application or website. It does so by adding content to a full-text index.

Is Lucene still used?

First written in 1999 by Doug Cutting, still going strong... Apache Lucene, the full-text search library, has operated and been maintained for more than 20 years and for many developers is an integral part of their website and application builds.

Why is Lucene so fast?

Why is Lucene faster? Lucene is very fast at searching for data because of its inverted index technique. Normally, datasources structure the data as an object or record, which in turn have fields and values.

What is the difference between Lucene and Elasticsearch?

Lucene or Apache Lucene is an open-source Java library used as a search engine. Elasticsearch is built on top of Lucene. Elasticsearch converts Lucene into a distributed system/search engine for scaling horizontally.


2 Answers

PyLucene is a Python wrapper around Lucene. Therefore, you have to install Lucene as well, and its installation may be a bit complex (especially on Windows!)

like image 78
rob Avatar answered Oct 10 '22 23:10

rob


You can't use Lucene itself from CPython without using a binary module, no.

You could use it directly from Jython, or you could use a Python port of Lucene, eg. Lupy (though Lupy is no longer under development).

If you're prepared to relax your non-binary requirement, PyLucene is a wrapper that embeds Java Lucene into Python.

This similar question offers some options: Is there a pure Python Lucene?

like image 29
RichieHindle Avatar answered Oct 10 '22 23:10

RichieHindle