Hi Grant,
I've been meaning to put this together for a while, and still haven't had the time to formally test everything. However, based on some initial experimentation, I'm attaching a list of search fields. I'd recommend testing them, rather than taking them as gospel at this point. My hope is to do this testing myself at some point, and add this to the documentation... but in the meantime, I will share my working notes. Attached you'll find a text file with my current notes. Some fields are tested, some aren't. It's also likely not fully comprehensive - there may be more fields we index that I haven't found.
I prepared this list by installing
Elasticsearch HEAD and exploring the output - and this was a while ago, so I haven't accounted for new fields added in 2.2 or later, for example. Note that I am NOT a developer, and who knows what I have misinterpreted - hence the need for testing.
If you want to see the full mapping of fields in Elasticsearch, you could try running the following command:
That will focus on information objects, which accounts for most major entity types in AtoM. To see the full index, try:
Note that nested elements - e.g. different i18n cultures - are separated by periods when broken out into the searchable term in AtoM - for example, General notes can be translated, so are nested in an i18n element - and then you need to specify what culture you want to search in when using the field name for targeted search. In the index mapping, this means it is nested - we can write out the final searchable field name like so:
- generalNotes.i18n.%LANG%.content
...where %LANG% indicates that user will input the desired ISO language code (ie.
generalNotes.i18n.en.content to search English notes)
In most cases, terms might appear in HEAD or in the ES mapping using underscores - for example,
donors.contact_informations.contact_person - but if I recall correctly, you have to change these to camelCase to be able to use them in the appropriate search box - e.g. donors.contactInformations.contactPerson. As you'll see in the attached document, I've already converted them to the proper search term for all but the section labelled "Accessions" - this area is still untouched in my testing, and I can no longer recall if all those fields relate to what is searchable via the accessions search box, or if the list continues onto other related entities (e.g. donors) that must be searched in a different dedicated search box.
THIS would be a great way for the AtoM community to help contribute to improving AtoM's documentation! To this end, I've put my notes into a publicly accessible Google doc. Anyone with this link can now view and edit the document. I've added some initial notes on the syntax used in AtoM to search on these fields, and some tricks I've learned along the way (e.g. how to search for records that have no data in a specific field, for example).