{
"info": {
"author": "dvdmgl",
"author_email": "dvdmgl@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content"
],
"description": "=============\n django-pg-fts\n =============\n \n Implementation PostgeSQL for Full Text Search for django 1.7, taking advantage of new features Migrations and Custom Lookups.\n \n \n Features:\n \n - FieldLookup's search, isearch, tsquery\n \n - Ranking support with normalization, and weights using annotations\n \n - Migrations classes to help create and remove index's, support for 'gin' or 'gist'\n \n - Migrations classes to help create and remove of trigger's\n \n - Multiple dictionaries support with trigger and FieldLookup's\n \n - Support for python 2.7, 3.3 and 3.4\n \n \n With multiple dictionary support, index and trigger migrations\n \n How it works\n ------------\n \n For a existing model::\n \n class Article(models.Model):\n title = models.CharField(max_length=255)\n article = models.TextField()\n \n You want to have full text search in fields title and article, and make give weight to title of 'A'.\n \n Import TSVectorField::\n \n from pg_fts.fields import TSVectorField\n \n Add to existing TSVectorField to model and tell the fields that you want to index and the dictionary::\n \n fts = TSVectorField(fields=(('title', 'A'), 'article'), dictionary='english')\n \n Create migrations file::\n \n python manage.py makemigrations article\n \n Open the new created migration and import CreateFTSIndexOperation, CreateFTSTriggerOperation, UpdateVectorOperation::\n \n from pg_fts.migrations import (CreateFTSIndexOperation, CreateFTSTriggerOperation,\n UpdateVectorOperation)\n \n And add to the end of operations::\n \n # update vector for already existing data\n UpdateVectorOperation(\n name='Article',\n field='fts', \n ),\n # create trigger for automatic insert and update vector\n CreateFTSTriggerOperation(\n name='Article',\n field='fts'\n ),\n # create gin index for vector\n CreateFTSIndexOperation(\n name='Article',\n field='fts',\n index='gin'\n )\n \n Make the changes to your database::\n \n python manage.py migrate article\n \n Now you have a full text search performance with a trigger that checks any changes in the tracked fields and updates vector field.\n \n You can search will match all words:\n \n >>> Article.objects.filter(fts__search='waz up')\n \n Will result in sql something like:\n \n .. code-block:: sql\n \n tsvector @@ to_tsquery('english', 'waz & up')\n \n Or isearch will match some words:\n \n >>> Article.objects.filter(fts__isearch='waz up')\n \n Will result in sql something like:\n \n .. code-block:: sql\n \n tsvector @@ to_tsquery('english', 'waz | up')\n \n But you can make a raw tsquery:\n \n >>> Article.objects.filter(fts__tsquery='waz & !up')\n \n Will result in sql something like:\n \n .. code-block:: sql\n \n tsvector @@ to_tsquery('english', 'waz & !up')\n \n And also rank the results with normalization and order:\n \n >>> from pg_fts.ranks import FTSRank\n >>> Article.objects.filter(\n rank=FTSRank(fts_search='waz up', normalization=[1,3])).order_by('-rank')\n \n For multiple dictionaries and more advanced options, check the `documentation `_.\n \n Documentation\n -------------\n \n Documentation available in `Read The Docs django-pg-fts.readthedocs.org `_\n \n Installation\n ------------\n \n Clone from GitHub::\n \n git clone git://github.com/dvdmgl/django-pg-fts.git django-pg-fts\n \n You should run the tests::\n \n python runtests.py\n \n Or running tox for py27, py33, py34::\n \n tox\n \n Install using pip from github::\n \n pip install git+https://github.com/dvdmgl/django-pg-fts\n \n Or using setup.py::\n \n python setup.py",
"description_content_type": null,
"docs_url": null,
"download_url": null,
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://www.dvdmgl.com/",
"keywords": "django postgres postgresql pgsql full text search fts",
"license": "BSD License",
"maintainer": null,
"maintainer_email": null,
"name": "django-pg-fts",
"package_url": "https://pypi.org/project/django-pg-fts/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django-pg-fts/",
"project_urls": {
"Homepage": "http://www.dvdmgl.com/"
},
"release_url": "https://pypi.org/project/django-pg-fts/0.1.1/",
"requires_dist": null,
"requires_python": null,
"summary": "Implementation of PostgreSQL Full Text Search for django 1.7",
"version": "0.1.1"
},
"last_serial": 1246284,
"releases": {
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "28e80aea7dff276b45ed3f8eb3fd6529",
"sha256": "e7249b405930dd04b65633dfce4e0aaae28875172df2dc83c5506451e3d81114"
},
"downloads": -1,
"filename": "django_pg_fts-0.1.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "28e80aea7dff276b45ed3f8eb3fd6529",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 14605,
"upload_time": "2014-10-02T21:19:53",
"url": "https://files.pythonhosted.org/packages/9e/38/bb732ae4377709d8728e02454010af00a099830a5a055d3b2608d10b8da3/django_pg_fts-0.1.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "92344d3fdd50da5b9c34e3606be3d0cf",
"sha256": "8bd1df25e7006ac7faf41d68507384044a8cc6b6ed4a9e119d32c0a16dbc73cc"
},
"downloads": -1,
"filename": "django-pg_fts-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "92344d3fdd50da5b9c34e3606be3d0cf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28355,
"upload_time": "2014-10-02T21:24:15",
"url": "https://files.pythonhosted.org/packages/fa/14/ad2ff4ac3980f4a61daf4b15b7d5f498c5e228267f2fcb3e5d558df3032c/django-pg_fts-0.1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "28e80aea7dff276b45ed3f8eb3fd6529",
"sha256": "e7249b405930dd04b65633dfce4e0aaae28875172df2dc83c5506451e3d81114"
},
"downloads": -1,
"filename": "django_pg_fts-0.1.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "28e80aea7dff276b45ed3f8eb3fd6529",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 14605,
"upload_time": "2014-10-02T21:19:53",
"url": "https://files.pythonhosted.org/packages/9e/38/bb732ae4377709d8728e02454010af00a099830a5a055d3b2608d10b8da3/django_pg_fts-0.1.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "92344d3fdd50da5b9c34e3606be3d0cf",
"sha256": "8bd1df25e7006ac7faf41d68507384044a8cc6b6ed4a9e119d32c0a16dbc73cc"
},
"downloads": -1,
"filename": "django-pg_fts-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "92344d3fdd50da5b9c34e3606be3d0cf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28355,
"upload_time": "2014-10-02T21:24:15",
"url": "https://files.pythonhosted.org/packages/fa/14/ad2ff4ac3980f4a61daf4b15b7d5f498c5e228267f2fcb3e5d558df3032c/django-pg_fts-0.1.1.tar.gz"
}
]
}