Skip to content

Commit

Permalink
[#1838] Adds docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Jul 22, 2014
1 parent f8e8976 commit d2a6c4b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ckan/config/deployment.ini_tmpl
Expand Up @@ -48,6 +48,8 @@ sqlalchemy.url = postgresql://ckan_default:pass@localhost/ckan_default
#ckan.datastore.write_url = postgresql://ckan_default:pass@localhost/datastore_default
#ckan.datastore.read_url = postgresql://datastore_default:pass@localhost/datastore_default

# Default Postgres' full-text search index language
ckan.datastore.default_fts_lang = english

## Site Settings

Expand Down Expand Up @@ -110,7 +112,6 @@ ckan.locale_order = en pt_BR ja it cs_CZ ca es fr el sv sr sr@latin no sk fi ru
ckan.locales_offered =
ckan.locales_filtered_out = en_GB


## Feeds Settings

ckan.feeds.authority_name =
Expand Down
6 changes: 4 additions & 2 deletions ckanext/datastore/logic/action.py
Expand Up @@ -274,8 +274,10 @@ def datastore_search(context, data_dict):
:type resource_id: string
:param filters: matching conditions to select, e.g {"key1": "a", "key2": "b"} (optional)
:type filters: dictionary
:param q: full text query (optional)
:type q: string
:param q: full text query. If it's a string, it'll search on all fields on
each row. If it's a dictionary as {"key1": "a", "key2": "b"},
it'll search on each specific field (optional)
:type q: string or dictionary
:param distinct: return only distinct rows (optional, default: false)
:type distinct: bool
:param plain: treat as plain text query (optional, default: true)
Expand Down
15 changes: 15 additions & 0 deletions doc/maintaining/configuration.rst
Expand Up @@ -108,6 +108,21 @@ with read permissions only. The format is the same as in :ref:`sqlalchemy.url`.

.. end_config-datastore-urls
.. _ckan.datastore.default_fts_lang:

ckan.datastore.default_fts_lang
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Example::

ckan.datastore.default_fts_lang = english

This can be ignored if you're not using the :doc:`datastore`.

The default language used when creating full-text search indexes and querying
them. If this value isn't set, it'll default to "english". It can be
overwritten by the user by passing the "lang" parameter to "datastore_search"
and "datastore_create".

Site Settings
-------------
Expand Down

0 comments on commit d2a6c4b

Please sign in to comment.