Ticket #1122 (closed enhancement: wontfix)
JSON Extra data not searchable
| Reported by: | dread | Owned by: | pudo |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | ckan | Keywords: | |
| Cc: | pudo | Repository: | ckan |
| Theme: | none |
Description
It is possible to use the CKAN API to insert JSON format data into package extra values, but this data is not found on searching.
Full text from Pascal:
we encountered a Problem concerning accessing Arrays/Lists.
curl -XGET 'http://ckan.net/api/rest/package/hbz_unioncatalog'
will get you amongst others:
"extras": {"publishingInstitution":
"[u'http://lobid.org/organisation/DE-605',
u'http://lobid.org/organisation/DE-290',
u'http://lobid.org/organisation/DE-38M',
u'http://lobid.org/organisation/DE-98',
u'http://lobid.org/organisation/DE-38',
u'http://lobid.org/organisation/DE-Kn41',
u'http://lobid.org/organisation/DE-82',
u'http://lobid.org/organisation/DE-107',
u'http://lobid.org/organisation/DE-929',
u'http://lobid.org/organisation/DE-Zw1',
u'http://lobid.org/organisation/DE-832']"}
but if I try to query this:
wget
'http://ckan.net/api/search/package?q=lobid&publishingInstitution="http://lobid.org/organisation/DE-605"'
I get only two packages, among the package "hbz_unioncatalog" is
missing. (These two packages have only one value for
"publishingInstitution").
The "extra/publishingInstitution"-Array was uploaded through a "curl
-XPUT ...
"extras": {
"publishingInstitution":[
"http://lobid.org/organisation/DE-605",
"http://lobid.org/organisation/DE-290",
"http://lobid.org/organisation/DE-38M",
"http://lobid.org/organisation/DE-98",
"http://lobid.org/organisation/DE-38",
"http://lobid.org/organisation/DE-Kn41",
"http://lobid.org/organisation/DE-82",
"http://lobid.org/organisation/DE-107",
"http://lobid.org/organisation/DE-929",
"http://lobid.org/organisation/DE-Zw1",
"http://lobid.org/organisation/DE-832"
]
},
...
Change History
comment:2 Changed 3 years ago by dread
- Owner set to pudo
- Status changed from new to assigned
This user is now storing his list as a string so is happy. But I'll leave this ticket open, for pudo to decide whether there is an issue with SOLR indexing tuples/lists, as per the previous comment.
comment:3 Changed 3 years ago by pudo
- Status changed from assigned to closed
- Resolution set to fixed
I don't think there's really a nice way to do this with the current solr indexing library, but I've commented out the list handling code which should really make handling this cleaner.
Note: See
TracTickets for help on using
tickets.

@pudo I notice you tackling solr indexing of lists/tuples in ckanext-solr cset:ecc2d69df991 so have updated to use this on ckan.net and reindexed, but #1122 still seems an issue - any chance you can take a look?