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

API search on occurrenceID fails #531

Closed
tucotuco opened this issue Mar 24, 2015 · 4 comments
Closed

API search on occurrenceID fails #531

tucotuco opened this issue Mar 24, 2015 · 4 comments

Comments

@tucotuco
Copy link
Member

The accepted structure of an API search based on an occurrenceID is of the form shown in the following example:

http://api.vertnet-portal.appspot.com/api/search?q={%22q%22:%22occurrenceid:7108667e-1483-4d04-b204-6a44a73a5219%22}

Parsing of this format fails for occurrenceIDs that have a ':' in the content, as that is used as a keyword designator. For example,

http://api.vertnet-portal.appspot.com/api/search?q={%22q%22:%22occurrenceid:urn:catalog:CRCM:Mammals:13-127%22}

@tucotuco tucotuco self-assigned this Mar 24, 2015
@tucotuco tucotuco added this to the End of grant milestone Mar 24, 2015
@sckott
Copy link

sckott commented Mar 24, 2015

looking forward to this fix 😄 Any idea what proportion of occurrence ids have this problem?

@sckott
Copy link

sckott commented Jun 25, 2015

any update on this?

@tucotuco
Copy link
Member Author

The current index has occurrenceIDs in the iptrecordid field. I'm having one of those, "What was I thinking moments." I think it is because this is where the occurrenceID HAD to go in earlier versions of the IPT. In any case, that is where they are, and they can be queried using a pattern that escape quotes the exact string you want to match. For example,

http://api.vertnet-portal.appspot.com/api/search?q={"q":"iptrecordid:\"urn:occurrence:Arctos:CUMV:Amph:10008:2243441\""}

I have updated the API documentation to explain this.

@sckott
Copy link

sckott commented Aug 25, 2015

great, thanks

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

No branches or pull requests

2 participants