https://github.com/aparo/django-elasticsearch
Django ElasticSearch Backend
https://github.com/aparo/django-elasticsearch
Last synced: over 1 year ago
JSON representation
Django ElasticSearch Backend
- Host: GitHub
- URL: https://github.com/aparo/django-elasticsearch
- Owner: aparo
- License: bsd-3-clause
- Created: 2010-07-22T16:36:37.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2011-09-02T21:46:33.000Z (almost 15 years ago)
- Last Synced: 2025-03-26T23:02:54.437Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 239 KB
- Stars: 141
- Watchers: 12
- Forks: 29
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
===========================
Django ElasticSearch Engine
===========================
:Info: It's a database backend that adds elasticsearch support to django
:Author: Alberto [aparo] Paro (http://github.com/aparo)
Requirements
------------
- Django non rel http://github.com/aparo/django-nonrel
- Djangotoolbox http://github.com/aparo/djangotoolbox
- pyes http://github.com/aparo/pyes
About Django
============
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
About ElasticSearch
===================
TODO
Infographics
============
::
- Django Nonrel branch
- Manager
- Compiler (ElasticSearch Engine one)
- ElasticSearch
django-elasticsearch uses the new django1.2 multi-database support and sets to the model the database using the "django_elasticsearch".
Examples
========
::
class Person(models.Model):
name = models.CharField(max_length=20)
surname = models.CharField(max_length=20)
age = models.IntegerField(null=True, blank=True)
def __unicode__(self):
return u"Person: %s %s" % (self.name, self.surname)
>> p, created = Person.objects.get_or_create(name="John", defaults={'surname' : 'Doe'})
>> print created
True
>> p.age = 22
>> p.save()
=== Querying ===
>> p = Person.objects.get(name__istartswith="JOH", age=22)
>> p.pk
u'4bd212d9ccdec2510f000000'