NotesForExhibitBuilder
Jump to navigation
Jump to search
URI
What should the URI be for a published exhibit? Currently, URIs are the unique identifiers for each object in the index.
- a random UUID--was the consensus by Erik, Beth and Jamie and is now implemented
What to Index?
- uri
- url
- archive--"nines"?
- author (role_aut)
- exhibit type
- status: published or shared
- license
- genres
- fulltext of exhibit content (not the contained objects)
- displayed metadata from the contained objects
- index manually for shared
- index on publish
- freeculter = false?
Indexing an Exhibit
The exhibit needs to know its own URI when it's indexed. This is so that if the exhibit is modified, it can update itself in the Solr index without creating a new entry. If the URI is blank then create a new Solr document and new URI, otherwise update the exisitng Solr document at that URI.
If an exhibit is already indexed and then updated, should it auto-update its index, or should this be a manual process? I'll implement manual first.
Modifying an Indexed Document
Currently, Collex uses a modified version of Solr that allows indexed documents (collex objects) to be modified in place. Syntax is:
req = Solr::Request::ModifyDocument.new( :uri => uri, :overwrite => {"#{username}_annotation" => annotation, "#{username}_tag" => tags, }, :distinct => {:username => username}) @solr.send(req)
The five modes are:
- append
- delete
- distinct (like append, but values must be distinct)
- increment (for numbers only)
- overwrite