[ckan-changes] [ckan/ckan] 9f9f41: [#1838] Add tests for current index creation code

GitHub noreply at github.com
Wed Jul 16 10:17:36 UTC 2014


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

  Changed paths:
    M ckanext/datastore/tests/test_create.py

  Log Message:
  -----------
  [#1838] Add tests for current index creation code


  Commit: 9072a9413ee3188c64e4700da823fa4d64e365f2
      https://github.com/ckan/ckan/commit/9072a9413ee3188c64e4700da823fa4d64e365f2
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2014-07-16 (Wed, 16 Jul 2014)

  Changed paths:
    M ckanext/datastore/db.py
    M ckanext/datastore/tests/test_create.py

  Log Message:
  -----------
  [#1838] Create FTS indexes on each textual field

We create those indexes at the same time we're indexing `_full_text`. This is
needed to allow full-text searches on specific columns, and not only on the
entire row.

For the test, unfortunately I couldn't test that a FTS index was created for
each specific field, but instead rely on the number of indexes, because as the
index is not on the column itself, but on the return value of `to_tsvector`, we
don't have that information available.

There're still issues with this code as we're using English for default (and
there's no way to overwrite that).


Compare: https://github.com/ckan/ckan/compare/c74a9b27a8a3...9072a9413ee3


More information about the ckan-changes mailing list