If you look at /index_script/format.bsh again, notice that one of the first places it looks for format information is 245$h:
    // check if there's an h in the 245
    if (title != null) {
        if (title.getSubfield('h') != null){
            if (title.getSubfield('h').getData().toLowerCase().contains("[electronic resource]")) {
                return result;

If the script finds "[electronic resource]" there (as in your case), it returns "Electronic" and doesn't look any further. You'll have to modify the script so that it collects both format values before returning the result. By the way, in order to use /index_script/format.bsh you need to uncomment this line in /marc_local.properties, otherwise SolrMarc will ignore your modificaitons: "#format = script(format.bsh), getFormat, format_map.properties". If you want the facet to display as "Online" rather than "Electronic", modify /translation_maps/format_map.properties so that "Electronic" is mapped to "Online".

245$h is not stored in the solr title field by default, so it is not displayed as part of the title. One way to display it would be to add $h in marc.properties or marc_local.properties, i.e."title = 245abh, first". However, this will mean that "electronic" "resource" are indexed as with any other word in the title, so there is a potential for some skewing of search results. This could also be handled more precisely with some modificaiton to /web/RecordDrivers/IndexRecord.php and /web/RecordDrivers/MarcRecord.php, but this is more complicated.

Hope this helps.

On 28 November 2010 19:13, Altaf Mahmud <altaf.mahmud@gmail.com> wrote:

I am uploading some electronic journals in marc format to VuFind. One of my sample data is like this:

=LDR  00000cas\a2200000\a\4500
=001  AAL001
=008  101125s9999\\\\xx\r\poo\\\\\000\0\eng\d
=022  0\$a1745-7270
=245  00$h[electronic resource]$aActa Biocimica et Biophysica
=260  \\$aOxford Journals OUP
=310  \\$a12 no. a year
=538  \\$aMode of access: Internet
=650  \0$aLife sciences
=856  40$zFulltext  available from Oxford University Press :2009-present$uhttp://abbs.oxfordjournals.org/

After uploading, it shows the format 'Electronic'. But I want to display it in 'Journal' format with 'Online'. Though my marc data have been prepared to show that, but doesn't seem to work. Do I need to make any change inside VuFind? Moreover, in case of any electronic resource, it should be mentioned just after the title, like [electronic resource]. It's not showing also. I also looked at ../index_script/format.bsh file which is used to determine the format of a record, but couldn't figure out the problem. Any help?

Altaf Mahmud
System Programmer
Ayesha Abed Library
BRAC University

Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
Vufind-tech mailing list