Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix datastore_search language parameter#5974

Merged
wardi merged 2 commits into
ckan:masterfrom
jqnatividad:5097-datastore-language-parameter
Mar 23, 2021
Merged

fix datastore_search language parameter#5974
wardi merged 2 commits into
ckan:masterfrom
jqnatividad:5097-datastore-language-parameter

Conversation

@jqnatividad
Copy link
Copy Markdown
Contributor

@jqnatividad jqnatividad commented Mar 20, 2021

Fixes #5097

This was also causing the revamped datatablesview from working properly, as datastore_search always used the default language (english) and ignored the passed language parameter (simple), which allowed partial word matches and not just Snowball stemming search. (Snowball stemming search background)

Fixing this will also make datastore_search results in non-english languages more relevant, as it will use the proper Snowball dictionary for the specified language.

Proposed fixes:

Fetch the language parameter using the right key - "language" as per the API docs and the validator, not "lang", as it was being used in the postgres backend.

Features:

  • includes tests covering changes
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

Fixes ckan#5097

This was also causing the revamped datatablesview from working properly, as datastore_search always used the default language (english) and ignored the passed language parameter (simple), which allowed partial word matches and not just the snowball word stemming search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Datastore_search full-text language parameter is not parsed correctly

3 participants