[ckan-changes] [ckan/ckan] 766dbe: [#1838] Small refactoring on plugin's datastore_se...

GitHub noreply at github.com
Thu Jul 10 18:36:24 UTC 2014


  Branch: refs/heads/1838-fts-on-specific-columns
  Home:   https://github.com/ckan/ckan
  Commit: 766dbe441e07bd60c4c04fb4093584493bbe4995
      https://github.com/ckan/ckan/commit/766dbe441e07bd60c4c04fb4093584493bbe4995
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2014-07-10 (Thu, 10 Jul 2014)

  Changed paths:
    M ckanext/datastore/plugin.py

  Log Message:
  -----------
  [#1838] Small refactoring on plugin's datastore_search()

I removed some unused variables, and stopped validating on _where(), as we're
already validating on datastore_validate().


  Commit: 30c6de01e3c050c32c1e84e454c86d6a2c8aa569
      https://github.com/ckan/ckan/commit/30c6de01e3c050c32c1e84e454c86d6a2c8aa569
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2014-07-10 (Thu, 10 Jul 2014)

  Changed paths:
    M ckanext/datastore/logic/schema.py
    M ckanext/datastore/plugin.py
    M ckanext/datastore/tests/test_search.py

  Log Message:
  -----------
  [#1838] Add full-text searching on specific fields on datastore_search

You still can send queries to `datastore_search` adding a `q` parameter as a
string, and they'll work as they always had (i.e. we're backwards compatible).
But now you're able to send `q` as a dict with a string value, as in:

```json
"q": {
    "title": "CKAN"
}
```

That would do a full-text search only on the "title" field, and return the
results. I haven't created the indexes yet, so these searches can be pretty
slow.


Compare: https://github.com/ckan/ckan/compare/766dbe441e07^...30c6de01e3c0


More information about the ckan-changes mailing list