Sha256: 4cc55ce0333c483ecf3f6aa5fde57acadcbdf26a64899a6e556d34cf90457ef4
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
Blacklight uses Solr as its data index. Blacklight is agnostic as to how that Solr index gets populated. Initial Blacklight development was geared towards work in university libraries, and deals with library data in the MARC format. The Blacklight out-of-the-box demo and test suite is geared towards that use case, but Blacklight itself is not limited to only serving MARC-based data. ## Common Patterns * [[Sunspot for Indexing]] * If you're not dealing with MARC records, you might do something like the following: ``` class MyModel < ActiveRecord::Base after_save :index_record before_destroy :remove_from_index attr_accessible :field_i_want_to_index def to_solr # *_texts here is a dynamic field type specified in solrconfig.xml {'id' => id, 'field_i_want_to_index_texts' => field_i_want_to_index} end def index_record SolrService.add(self.to_solr) SolrService.commit end def remove_from_index SolrService.delete_by_id(self.id) SolrService.commit end end ``` ## What’s the relationship between Blacklight and SolrMarc? However, one excellent way to index lots of MARC records into Solr quickly is to use SolrMarc. Some of the same people are active in both projects, e.g, Bob Haschart from UVA and Naomi Dushay from Stanford University. SolrMarc is not a Blacklight-specific project, it is also used by VuFind and other projects, and is a separate project that exists in its own right.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight-5.9.4 | doc/Indexing-your-data-into-solr.md |