Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword parameter overwrites q parameter #13

Open
jeffsteward opened this issue May 5, 2020 · 2 comments
Open

Keyword parameter overwrites q parameter #13

jeffsteward opened this issue May 5, 2020 · 2 comments

Comments

@jeffsteward
Copy link
Contributor

Originally reported here:

That was my bad I was trying to throw more things onto to get it to work. I think the main issue was that q was being overridden by keyword. When I commented out keyword in my call all the results would have the correct imagepermissionlevel:0. I ended up using title instead of keyword which didn't have the same issue.

Would still get imagepermissionlevel not equal to zero:
https://api.harvardartmuseums.org/object?apikey=[mykey]&hasimage=1&sort=random&person=any&keyword=sun&q=imagepermissionlevel:0

This worked:
https://api.harvardartmuseums.org/object?apikey=[mykey]&hasimage=1&sort=random&person=any&title=sun&q=imagepermissionlevel:0

Originally posted by @heatherca in #9 (comment)

@CoupDeWhoop
Copy link

@jeffsteward
Copy link
Contributor Author

jeffsteward commented Jul 23, 2024

Thanks for clarifying.

The API accepts only one q parameter per request. Terms must be clustered with boolean operators. See the Elasticsearch documentation on boolean operators for more examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants