Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
adds extra info about ES to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chartpath committed Apr 7, 2015
1 parent de10896 commit de0363e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Changelog
=========

* :release:`0.1.0 <2015-05-06>`
* :support:`0` Initial release after two years of development as "Presto". Now with database engines! Originally extracted and generalized from the Brandicted API which only used MongoDB.
* :release:`0.1.1 <2015-05-07>`
* :feature:`0` Added script ot index Elasticsearch models.
* :feature:`0` Started adding tests.
* :support:`0` Listing on PyPI.

* :release:`0.1.0 <2015-05-01>`
* :support:`0` Initial release after two years of development as "Presto". Now with database engines! Originally extracted and generalized from the Brandicted API which only used MongoDB.
37 changes: 37 additions & 0 deletions docs/source/elasticsearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,40 @@ Elasticsearch Support

Nefertari uses `Elasticsearch <https://www.elastic.co/products/elasticsearch>`_ behind the scenes for most read/GET views.

Making requests
---------------

For models which subclass ESBaseDocument in your project, you may pass various parameters in the URL to use the search API. See the list of parameters on the `nefertari-example project's readme <https://github.com/brandicted/nefertari-example>`_.


Indexation script
-----------------

In nefertari/scripts you will find es.py, which can be used to manually index models from your database engine to Elasticsearch.

You can run it like so::
$ cd nefertari/scripts
$ ./es.py --help

The options available are:

**config**: specify ini file to use (required). E.g.::

$ ./es.py --config ../local.ini

**quiet**: "quiet mode" (surpress output). E.g.::

$ ./es.py --quiet

**models**: list of dotted paths of models to index. Models must be subclasses of ESBaseDocument. E.g.::

$ ./es.py --models example_api.model.story

**params**: URL-encoded parameters for each module.

**index**: Specify name of index. E.g. the slug at the end of http://localhost:9200/example_api

**chunk**: Chunk size.

**force**: Force indexation, even of existing documents (defaults to False).

0 comments on commit de0363e

Please sign in to comment.