Dear experts,
maybe it's just a FAQ, but I can't find a solution.
*Background*
In our union catalog we have several libraries. Their holding
information is coded in the marc:924 field (German convention).
I.e:
- 924a item's local number
- 924b library's id (ISIL)
https://en.wikipedia.org/wiki/International_Standard_Identifier_for_Libraries_and_Related_Organizations
- 924g item's shelfmark
(see example below)
*Request*
We need to implement for each library a own search field, containing
only their own shelfmarks {shelfmark_lib-a, ..., shelfmark_lib-n}
Normaly (pure SOLR) I would define a dynamic field 'shelfmark_*' and
would add for each marc:924 the value of subfield 'g' to
shelfmark_<value of subfield 'b'>
*Question*
With solrmarc it is easy to write custom methods to populate named
fields. But this names have to be fixed.
I found no way to configure something like:
shelfmark_<?> = custom(de.foo.bar.myIndexer), dataPerLibrary
"What is the right way to define something like this?"
Most likely, this attempt might conflicts the 'normal' concept of
solrmarc.properties.
So my alternative question is:
"Is it possible to manipulate the SolrInputDocument from a subclass of
org.solrmarc.index.SolrIndexer?"
Regards
Uwe
#######
Example
###
<?xml version="1.0" encoding="UTF-8"?>
<collection xmlns="
http://www.loc.gov/MARC21/slim">
<record>
<leader>00000cam a2200000 c 4500</leader>
...
<datafield tag="245" ind1="1" ind2="0">
<subfield code="a">Popular title</subfield>
<subfield code="c">Kurt Gödel</subfield>
</datafield>
...
<datafield tag="924" ind1="0" ind2=" ">
<subfield code="a">Local id in library A</subfield>
<subfield code="b">DE-A</subfield>
<subfield code="g">AAA</subfield>
</datafield>
...
<datafield tag="924" ind1="0" ind2=" ">
<subfield code="a">Local id in library B</subfield>
<subfield code="b">DE-B</subfield>
<subfield code="g">BBB</subfield>
</datafield>
</record>
Should result in:
'AAA' -> shelfmark_DE-A
'BBB' -> shelfmark_DE-B
####
EOF