Thomas Shepard:

 For question 1, you could use a pattern-based translation map, which allows regular-expression based pattern matching.  The following example is one that we use for mapping the contents of the 245h field to a more normalized form.

medium_display = 245h, (pattern_map.medium), first

pattern_map.medium.pattern_0 = [Ss]ound[ ]+recording=>sound recording
pattern_map.medium.pattern_1 = [Vv]ideo[-]?recording=>videorecording
pattern_map.medium.pattern_2 = [Ee]lectronic book=>electronic book
pattern_map.medium.pattern_3 = [Ee]lectronic [a-z]*=>electronic resource
pattern_map.medium.pattern_4 = [Mm]icro(form|film|fiche)=>microform
pattern_map.medium.pattern_5 = [Mm]icrofiche=>microform
pattern_map.medium.pattern_6 = [Ss]lide=>slide
pattern_map.medium.pattern_7 = CD=>sound recording
pattern_map.medium.pattern_8 = DVD=>videorecording
pattern_map.medium.pattern_9 = [Cc]omputer[ ]*file=>computer file
pattern_map.medium.pattern_10 = [Mm]anuscript=>manuscript
pattern_map.medium.pattern_11 = [Pp]icture=>picture
pattern_map.medium.pattern_12 = \b[Gg]raphic\b=>graphic
pattern_map.medium.pattern_13 = [Mm]ap=>cartographic material
pattern_map.medium.pattern_13 = [Cc]artographic material=>cartographic material
pattern_map.medium.pattern_14 = [Ss]eries record=>series record
pattern_map.medium.pattern_15 = [Mm]otion picture=>motion picture
pattern_map.medium.pattern_16 = [Aa]rt reproduction=>art reproduction
pattern_map.medium.pattern_17 = [Aa]rt original=>art original
pattern_map.medium.pattern_18 = [Mm]otion picture=>motion picture
pattern_map.medium.pattern_19 = ^([Cc]hart|[Kk]it|[Bb]raille|[Rr]ealia|[Gg]ame|[Ee]quipment|[Ff]ilmstrip|[Ww]ebsite|[Tt]ransparency|[Mm]odel)$=>$1

For question 2 if you change the specification to be like this, I think it will work:

format2 = 521a:300e,, first

-Bob Haschart

On 6/18/2014 11:21 AM, Tod Olson wrote:
Yes, either focus on the bash scripts for what you want to do, or if you’re comfortable with Java you can do a mixin.

If you want to do the bash script, pick apart this line from import/

dewey-hundreds = script(dewey.bsh), getDeweyNumber(082a:083a, 100),

That names the script file to load, the function in the script file to invoke, and the translation map. getDeweyNumber() should show you how to process the tag string to pick up the fields you want.



On Jun 18, 2014, at 8:39 AM, Shepard, Thomas - 1150 - MITLL <> wrote:

I have a couple of follow-up questions to my March 2014 post (which I should add has been resolved by escaping those pesky periods).
1.       I want to create a new translation_map but it appear that the original values (left column) must be single strings/words without spaces. I would like vufind to be able to take a character string with spaces and punctuation and change it to a uniform lookup value. I suppose the real solution is to copy and edit one of those bash scripts found in  index_scripts, but I was hoping to take this problem down an easier road.  I tried using quotes but those didn’t work.
2.       In my, I have attempted in various ways to set up two marc fields to share the same translation_map.
To be specific, I want 521a and 300e to share
format2 = 521a,, first works just fine but none of the following variations do:
format2 = 521a,, first:300e,, first
format2 = 521a,, first:300e,
This also works;
format2 = 521a:300e
to give me the raw values from those fields, but of course does nothing to normalize those values.
So… should I focus on editing one of those bash scripts to get what I want?
Thom Shepard
From: Demian Katz [] 
Sent: Monday, March 24, 2014 2:48 PM
To: Shepard, Thomas - 1150 - MITLL;;
Subject: RE: vufind import options and mapping files
I’m copying the solrmarc-tech list in case anyone there has more specific insights.
I’m guessing that the problem here is that periods have a special meaning in the property map, because you can use them to create named maps. You might want to try escaping them with backslashes to see if that helps.
If you remove all of the values from your map that contain dots, do you at least see the other values coming through? I would expect so – I see no other obvious problems with your map or properties configuration. If even a stripped-down map is failing, perhaps there is some other problematic detail that I am failing to spot right now.
- Demian
From: Shepard, Thomas - 1150 - MITLL [] 
Sent: Monday, March 24, 2014 1:53 PM
Subject: [VuFind-Tech] vufind import options and mapping files
I have created a new facet in vufind that uses our marc  521 field.
The facet successfully displayed all values, but that’s now the problem.
We see that some of the older marc records have inconsistent values.
So I created a file that contains the following:
eBook. = eBook
eBooks. = eBook
eBook = eBook
eBooks = eBook
eBooks = eBook
Book = Book
Audiovisual. = Audiovisual
Audiovisual = Audiovisual
My expectation was that the values on the left (with periods) would map to the values on the right.
I also thought that the values not listed in this file would vanish from the facet.
Instead my format2 facet disappeared entirely.
Here is my configuration for this field with our mapping lookup in our  
format2 = 521a,, first
(I tried other variations as well)
Again, the above results in no format2 facet getting displayed
And, no surprise, the following results in ALL values in 521 being displayed.
format2 = 521a
So my question is, Must I remove periods from my 521 field either before I import my records or is there a simple way to tell vufind to do so?
I realize I could do this in a bsh script but I am hoping I don’t need to.
Thanks in advance,
Thom Shepard
Thom Shepard
Information Services Dept.
MIT Lincoln Lab, SM-730A
244 Wood St. Lexington, 02420-9176
781 981 0370
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
VuFind-General mailing list

You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit