omit field in

Skip to first unread message

Michael Lackhoff

Apr 3, 2021, 2:47:57 PM4/3/21

I am in the process of automating my Vufind installation and would like
to avoid editing
All the overrides should go into but I couldn't
find an easy way to omit the "building" field that is set in I just want to get rid of it, as I said without
removing it from so I have a clean distinction between
the "official" files and my local changes.

What I tried:
building = false # Error
building = null # Error
building = omit # Error
building = "" # keeps empty field
building = 999x ? ($x == "sffsd") # works but is ugly

Is there a better way?

Another question: Is it possible to set upperCaseSubfields in a config
file? It would be nice if I could set it in but that
doen't seem to have any effect. I had to add
to the INDEX_OPTIONS environment variable to avoid the uppercase errors.
I would prefer to set it in a config/properties file since maintainance
should be easier if it is not burried within a long variable that has
lots of settings.
Also I would like to have the content related settings separate from the
system specific (like memory settings).

As you can see nothing critical but the necessary customization for the
next install (when I have forgotten all the details from this run) would
be very easy and obvious.


Demian Katz

Apr 3, 2021, 6:11:46 PM4/3/21
Regarding the "omit a field" question, I'm surprised that there's not an easy way to do this, but I can't think of anything beyond what you have tried so far. I think if you write a custom routine that simply returns null, that should do the job, but there ought to be an easier way. I think it would be nice to have a "dropFieldIfFieldEmpty" modifier similar to "deleteRecordIfFieldEmpty." Hopefully Bob will step in and provide an answer if there's something I simply don't know about!

As for setting upperCaseSubfields in a config file, I think it was Bob's intent to move away from config files in favor of command line parameters, so the current config file handling is kind of a thin layer designed for backward compatibility, but it may not be forward looking. I agree with you that config files can have some advantages, so I wouldn't mind if this were improved and made more flexible... though it's also been on my radar to consider reworking VuFind's scripting to rely less on configuration files, in case the built-in SolrMarc support goes away in the future. (Though it hasn't gone any further than being generally on my radar, given many other priorities that have taken more of my attention 😊).

- Demian
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 view this discussion on the web visit

Robert Haschart

Apr 6, 2021, 1:04:29 PM4/6/21
There isn't an existing feature designed to do that.    However there is a feature you can misuse to accomplish that.

building = NOTused

What this does is override the previous existing definition in the default properties file, and replace it with a definition that looks for any and all fields where the field label is the uppercase letters "NOT'  since field labels can be three digits OR three uppercase letters.   Then in the fields that it finds it will try to extract the subfields   $u $s $e $d   but since there (probably) aren't any fields with a label "NOT"  no data will be extracted.

You could use any three uppercase letters as the non-existant field to look for, but something like the above helps the result be (somewhat) self-explanatory.

-Bob Haschart

Reply all
Reply to author
0 new messages