Query Syntax.. Multiple Categories

14 views
Skip to first unread message

ade56

unread,
Dec 14, 2011, 5:23:53 PM12/14/11
to DigitalNZ
Hi there..

I am struggling with query syntax for multiple categories.

http://api.digitalnz.org/records/v1.xml?search_text=wellington%20AND%20category:%22Images%22%20OR%20category:%22Videos%22&api_key=my_key

What i would like from the above query is to search results with
"Wellington" and return all Images and Videos with that text in the
description.. However the query above returns Wellington text and
Images and just any video (unrelated to text='wellington')

Could anyone help? is this even possible or not?

Thanks for reading this,

Andrew

Chris McDowall

unread,
Dec 14, 2011, 7:54:07 PM12/14/11
to DigitalNZ
Hi Andrew,

Almost there. One way to achieve your query is to wrap the format
request in brackets.

search_text=wellington AND (category:"Images" OR category:"Videos")

The full query becomes:
http://api.digitalnz.org/records/v2.xml?search_text=wellington%20AND%20%28category:%22Images%22%20OR%20category:%22Videos%22%29&num_results=100&api_key=YOUR_API_KEY

Does that do what you want?

Chris

On Dec 15, 11:23 am, ade56 <ad...@uclive.ac.nz> wrote:
> Hi there..
>
> I am struggling with query syntax for multiple categories.
>

> http://api.digitalnz.org/records/v1.xml?search_text=wellington%20AND%...

Reply all
Reply to author
Forward
0 new messages