NationalMuseumAustralia / Collection-API

The public web API of the National Museum of Australia
10 stars 0 forks source link

Searching on "type" no longer includes AdditionalType field #28

Closed stooit closed 6 years ago

stooit commented 6 years ago

One of the testing tasks requires the following

...displays all objects with the type of "toy trains”

During beta testing this was possible with the following query: http://nma.conaltuohy.com/object?type=toy+train&media=*&format=simple

Now this produces a 404. My current theory is the additionalType field is no longer included in the type query. You can get a similar result set by instead searching on ?text=toy+train+set.

Conal-Tuohy commented 6 years ago

Your theory is correct. In the early beta the search index's type field included both the primary types (object, party, etc) and also the detailed classifications (toy trains, magazines, kitchen sinks). The mixing caused other problems with the API so we stopped mixing the two. The good news is that in the current API we now have additionalType as a URL parameter, corresponding to `additionalType and classified_as in the simple JSON and JSON-LD formats, respectively.

stooit commented 6 years ago

Perfect! Thanks, closing this one.