Created
June 13, 2013 21:12
-
-
Save jcoyne/5777417 to your computer and use it in GitHub Desktop.
Collections in solr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| f = GenericFile.first | |
| => #<GenericFile pid:"scholarsphere:r49507488"... | |
| > f.collections | |
| => [] | |
| > c = Collection.new | |
| => #<Collection pid:""... | |
| > c.apply_depositor_metadata('jcoyne') | |
| => true | |
| > c.save | |
| => true | |
| > c.pid | |
| => "scholarsphere:5m60rj293" | |
| > f.collections = [c] | |
| => [#<Collection pid:"scholarsphere:5m60rj293", depositor:"jcoyne", date_uploaded:Thu, 13 Jun 2013, date_modified:Thu, 13 Jun 2013, title:nil, description:nil>] | |
| > f.save | |
| => true | |
| f.to_solr['collection_sim'] | |
| => ["scholarsphere:5m60rj293"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment