[ckan-dev] How to make autocomplete work with tags belonging to that vocabulary

Qifeng.Bai at csiro.au Qifeng.Bai at csiro.au
Wed Oct 29 03:42:01 UTC 2014


Hi, there
I am trying to make an autocomplete function work with tags belonging to a vocalulary.
I have created a vocabulary: country_codes which contains de,es,etc. Below is the result:
http://127.0.0.1:5000/api/3/action/tag_list?vocabulary_id=country_codes
result: ["de","es","fr","ie","uk"]

Also, I can get free tags.

http://127.0.0.1:5000/api/3/action/tag_list
result: ["economy","econormy"]   - Return a list of the site's tags. By default only free tags

When I tried this autocomplete url, it returned me ["economy","econormy"].
http://127.0.0.1:5000/api/2/util/tag/autocomplete?incomplete=e

How can I make the autocomplete function returns the tags belongings to 'country_codes'

Cheers






[cid:image001.gif at 01CC55BF.85E7FEB0]

Qifeng Bai
Software Engineer
CSIRO Land and Water
Black Mountain, Canberra

Ph: +61-2-62465704
Web: www.clw.csiro.au



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141029/bb729a68/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2094 bytes
Desc: image001.gif
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141029/bb729a68/attachment-0002.gif>


More information about the ckan-dev mailing list