Skip to content

Commit

Permalink
Readme converted to markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
coady committed Aug 29, 2018
1 parent 05a7fd7 commit 2255f7c
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 101 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ clean:

html:
make -C docs $@ SPHINXOPTS=-W
rst2$@.py README.rst docs/_build/README.$@

dist: html
python3 setup.py sdist bdist_wheel

check:
python3 setup.py $@ -mrs
python3 setup.py $@ -ms
flake8
python3 -m examples
pytest-2.7 tests/test_engine.py --cov=lupyne.engine --cov-fail-under=100
Expand Down
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[![image](https://img.shields.io/pypi/v/lupyne.svg)](https://pypi.org/project/lupyne/)
![image](https://img.shields.io/pypi/pyversions/lupyne.svg)
![image](https://img.shields.io/pypi/status/lupyne.svg)
[![image](https://api.shippable.com/projects/56059e3e1895ca4474182ec3/badge?branch=master)](https://app.shippable.com/github/coady/lupyne)
[![image](https://api.shippable.com/projects/56059e3e1895ca4474182ec3/coverageBadge?branch=master)](https://app.shippable.com/github/coady/lupyne)

Lupyne is a search engine based on [PyLucene](http://lucene.apache.org/pylucene/), the Python extension for accessing Java Lucene.
Lucene is a relatively low-level toolkit, and PyLucene wraps it through automatic code generation.
So although Java idioms are translated to Python idioms where possible, the resulting interface is far from Pythonic.
See `./examples` for comparisons with the Lucene API.

Lupyne also provides a RESTful JSON search server, based on [CherryPy](http://cherrypy.org).
Note Solr and Elasticsearch are popular options for Lucene-based search, if no further (Python) customization is needed.
So while the server is suitable for production usage, its primary motivation is to be an extensible example.

Not having to initially choose between an embedded library and a server not only provides greater flexibility,
it can provide better performance, e.g., batch indexing offline and remote searching live.
Additionally only lightweight wrappers with extended behavior are used wherever possible,
so falling back to using PyLucene directly is always an option, but should never be necessary for performance.

# Usage
PyLucene requires initializing the VM.

```python
import lucene

lucene.initVM()
```

Indexes are accessed through an `IndexSearcher` (read-only), `IndexWriter`, or the combined `Indexer.

```python
from lupyne import engine

searcher = engine.IndexSearcher('index/path')
hits = searcher.search('text:query')
```

Run the server.

$ python -m lupyne.server

Read the [documentation](http://lupyne.surge.sh).

# Installation

$ pip install lupyne

# Dependencies
* PyLucene >=6.5 (installed separately)
* six

Optional server extras:
* Python >=3.4
* cherrypy >=10
* clients >=0.2

# Tests
100% branch coverage.

$ pytest [--cov]

# Changes
2.0
* PyLucene >=6 required
* Python 3 support
* client moved to external package

1.9
* Python 2.6 dropped
* PyLucene 4.8 and 4.9 dropped
* IndexWriter implements context manager
* Server DocValues updated via patch method
* Spatial tile search optimized

1.8
* PyLucene 4.10 supported
* PyLucene 4.6 and 4.7 dropped
* Comparator iteration optimized
* Support for string based FieldCacheRangeFilters
97 changes: 0 additions & 97 deletions README.rst

This file was deleted.

5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
name='lupyne',
version=lupyne.__version__,
description='Pythonic search engine based on PyLucene, including a standalone server based on CherryPy.',
long_description=open('README.rst').read(),
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='Aric Coady',
author_email='aric.coady@gmail.com',
url='https://bitbucket.org/coady/lupyne',
Expand All @@ -24,9 +25,9 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand Down

0 comments on commit 2255f7c

Please sign in to comment.