Skip to content

Instantly share code, notes, and snippets.

@kspurgin
Last active January 31, 2022 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kspurgin/6e7f3d4c93bc8175b9c34e7fce3e480f to your computer and use it in GitHub Desktop.
Save kspurgin/6e7f3d4c93bc8175b9c34e7fce3e480f to your computer and use it in GitHub Desktop.
CollectionSpace API Keyword Search testing

Keyword search (collectionobjects) for: tea

As expected, to show objects that exist.

1. objectNumber: tea platter
1. title:
2. objectNumber: Tea cup
2. title:
3. objectNumber: tea saucer
3. title:
4. objectNumber: Tea Set
4. title:

Keyword search (collectionobjects) for: set

As expected, to show objects that exist.

1. objectNumber: Coffee set
1. title: Fancy coffee set
2. objectNumber: Tea Set
2. title:

Keyword search (collectionobjects) for: tea set

Keywords are AND-ed. If they were OR-ed, I'd expect all 5 results to be returned

1. objectNumber: Tea Set
1. title:

Keyword search (collectionobjects) for: tea coffee set

Keywords are AND-ed. If they were OR-ed, I'd expect all 5 results to be returned

No results

Keyword search (collectionobjects) for: em

A two-letter word is retrieved. Short words do not seem to be ignored unless they are stopwords.

1. objectNumber: Em dash
1. title: Em dash

Keyword search (personauthorities/person) for: A.

Assumed stopword. As expected. There is a "First A. Name" in the system, though.

No results

Keyword search (personauthorities/person) for: Q.

As expected, showing names in system. A one-letter "word" is searched fine if it is not a stopword.

1. termDisplayName: John Q. Public
2. termDisplayName: First Q. Name

Keyword search (personauthorities/person) for: First

As expected, showing names in system.

1. termDisplayName: First Name
2. termDisplayName: First Q. Name
3. termDisplayName: First A. Name
4. termDisplayName: First Last
5. termDisplayName: First Layer

Keyword search (personauthorities/person) for: Name

Showing some names in system. Appears to be searching field names as well as field values, which is unexpected. Or it's retrieving all because of the :item:name( part of the refName...

1. termDisplayName: John Q. Public
2. termDisplayName: First Name
3. termDisplayName: First Q. Name
4. termDisplayName: First A. Name
5. termDisplayName: William Dodge Stevens
6. termDisplayName: Spaulding County
7. termDisplayName: David Taylor
8. termDisplayName: Linda Colet
9. termDisplayName: Miranda Hambro
10. termDisplayName: Leonard Cohen
11. termDisplayName: Dusty Dunbar
12. termDisplayName: Calvin Warner Dunbar
13. termDisplayName: Bearsky Bear
14. termDisplayName: Brandi Burns
15. termDisplayName: Joseph Conrad
16. termDisplayName: Lucy
17. termDisplayName: Lucy
18. termDisplayName: Lynn
19. termDisplayName: Jenni Salamon
20. termDisplayName: Ann Sham
21. termDisplayName: Ann The Best Conservator
22. termDisplayName: Aziza
23. termDisplayName: Julia Colet
24. termDisplayName: John Doe
25. termDisplayName: Colet, Julia

Keyword search (personauthorities/person) for: First A. Name

Appear to neither AND-ed. Since "name" is in everything, it is finding everything with "first" and "name"

1. termDisplayName: First Name
2. termDisplayName: First Q. Name
3. termDisplayName: First A. Name
4. termDisplayName: First Last
5. termDisplayName: First Layer

Keyword search (personauthorities/person) for: First Q. Name

AND-ed

1. termDisplayName: First Q. Name

Keyword search (personauthorities/person) for: First Name

Appear to neither AND-ed. Since "name" is in everything, it is finding everything with "first" and "name"

1. termDisplayName: First Name
2. termDisplayName: First Q. Name
3. termDisplayName: First A. Name
4. termDisplayName: First Last
5. termDisplayName: First Layer

Keyword search (vocabularies/annotationtype) for: additional taxa

Exact match

1. refName: urn:cspace:core.collectionspace.org:vocabularies:name(annotationtype):item:name(additional_taxa)'additional taxa'

Keyword search (vocabularies/annotationtype) for: ADDITIONAL TAXA

Case insensitive

1. refName: urn:cspace:core.collectionspace.org:vocabularies:name(annotationtype):item:name(additional_taxa)'additional taxa'

Keyword search (vocabularies/annotationtype) for: Additional taxa

Case insensitive

1. refName: urn:cspace:core.collectionspace.org:vocabularies:name(annotationtype):item:name(additional_taxa)'additional taxa'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment