I would advise against option #1 -- this seems like the least scalable solution, since it would require you to add a whole new index field every time you add a location. (Perhaps this is extremely unlikely to happen… but it still seems better to plan for growth).


Option #2 is going to add a little bit of processing to detect and strip prefixes, but I don't think this would have a significant performance impact.


A third option to consider would be using the location field (or some new field along the same lines) to keep track of the location of each ID. As long as you index the IDs and location strings in the same order, the values within the index should remain parallel… so you could end up with arrays like this in your Solr records:


id => array(13613, 834523, 83224)

location => array('Library A', 'Library B', 'Library C')


… and you could safely assume that, for example, 834523 is an ID for Library B.


I think your option #2 has the advantage of easier human readability, while my option #3 might be slightly more efficient and lead to slightly simpler code. I don't think there's a really strong argument for either one over the other, so it's probably down to your preference… but if anybody else has thoughts on this, please share them!


- Demian


From: Osullivan L. [mailto:L.Osullivan@swansea.ac.uk]
Sent: Monday, January 25, 2010 5:26 AM
To: vufind-tech@lists.sourceforge.net
Subject: [VuFind-Tech] Multiple Ids




One of the tasks we will need to perform for our VuFind installation is to create access to three different library systems.


To achieve this, we will create merged marc records which will contain up to three Bib Ids in a local field.


When we come to load the records, I can see two possibilities:


1)      Create three separate fields e.g. <field name="systema_id" type="string" indexed="true" stored="true"/> <field name="systemb_id" type="string" indexed="true" stored="true"/> <field name="systemc_id" type="string" indexed="true" stored="true” />

2)      Create one multivalued field and append a system prefix to each Bib Id. <field name="system_ids" type="string" indexed="false" stored="true" multiValued="true"/>


Does anyone know of any performance issues related to each method? Is there anything else I should consider?


Kind Regards,


Luke O'Sullivan
Library Systems Officer - Virtual Academic Library
South West Wales Higher Education Partnership (SWWHEP)

Tel: 01792 602772
Website: www.swwhep.ac.uk

Ffn: 01792 602772

Check out the new SWWHEP Online GreenGuide at: