hudmol/archivesspace — pull request #213 by marktriggs (2013-01-02 08:42:23+00:00)
Title: Distinguish between a record's primary type and other types.

It makes sense for records to be able to take multiple types: for example, an
agent person record is primarily of type 'agent_person', but is also the more
general type 'agent'. When searching by type we want our search to match any of
the record's types, but when displaying results we only really care about what
the primary type is.

So, we index record types in two different ways:

* 'primary_type' is a single-valued field containing the record's primary
type (like agent_person)

* 'types' is a multi-valued field containing all types (['agent_person',
'agent'])

I've modified the search filters to use 'types', and the frontend to use
'primary_type'.