HHS / ckanext-datajson

Custom CKAN extension for Healthdata.gov
http://hub.healthdata.gov/data.json
19 stars 72 forks source link

Use search to get datasets, as it is significantly faster #8

Open amercader opened 11 years ago

amercader commented 11 years ago

Getting stuff from the search index is much faster than querying the DB

amercader commented 11 years ago

I'm not entirely sure how the keywords property needs to be handled. It looks like a comma separated string was generated on data.json but the spec [1] says an array of strings?

Field keyword Cardinality (1,n) Required Yes, always Accepted Values Array of strings Usage Notes Surround each keyword with quotes. Separate keywords with commas. Example {"keyword": ["squash","vegetables","veggies","greens","leafy","spinach","kale","nutrition","tomatoes","tomatos"]}

[1] http://project-open-data.github.io/schema/

JoshData commented 11 years ago

Why don't we just revise current_package_list_with_resources to use search as its backend rather than the database?

amercader commented 11 years ago

Fair enough, but that would involve more testing, reviewing and waiting for the next CKAN release.

JoshData commented 11 years ago

If you patch CKAN I'll merge this pull request. :-P

Meanwhile, my contract with HHS has officially ended so if and until it gets renewed I'm on break from this repo.

amercader commented 11 years ago

OK I'm not using this extension, was just evaluating it for other stuff, spotted this and thought it would be helpful for users. It can definitely stay in the PR purgatory for a while :turtle: