solrmarc example

79 views
Skip to first unread message

mbach

unread,
Apr 10, 2009, 2:37:21 PM4/10/09
to solrmarc-general
Good day everyone,

I am attempting to launch a union catalog of disparate academic
catalogs (with different ILSs) in vufind and have a question regarding
solrmarc.

I am using openbiblio (http://obiblio.sourceforge.net/) as an agnostic
foundation for the union catalog with vufind sitting on top. The
problem is that I can't export MARC21 from openbiblio. I have written
an export routine that will dump out valid MARCXML but this will not
index into vufind.

The question is... are there examples of valid solrmarc that I can
model against? Or a schema or DTD?

Thank you,

Matt

Andrew Nagy

unread,
Apr 10, 2009, 5:33:53 PM4/10/09
to solrmarc...@googlegroups.com
Matt - I think your best way to get this to work would be to use yaz-marcdump to conver the marcxml to marc21.  Then Solrmarc should eat it up no problem.

Andrew

mbach

unread,
Apr 13, 2009, 8:48:01 AM4/13/09
to solrmarc-general
Thanks Andrew,

To follow up with another noob question...

I have installed Yaz on Windows and have the client terminal open but
how do I initiate marcdump from here? If I issue the yaz-marcdump
command I get "Unknown command: marcdump".

Matt

On Apr 10, 5:33 pm, Andrew Nagy <asn...@gmail.com> wrote:
> Matt - I think your best way to get this to work would be to use
> yaz-marcdump to conver the marcxml to marc21.  Then Solrmarc should eat it
> up no problem.
>
> Andrew
>

Andrew Nagy

unread,
Apr 13, 2009, 9:34:38 AM4/13/09
to solrmarc...@googlegroups.com
Matt - I'm sorry, I have never used yaz on windows.  All I can do to help is point you to the yaz documentation:

http://www.indexdata.com/yaz/doc/

Andrew

Andrew Nagy

unread,
Apr 13, 2009, 9:35:28 AM4/13/09
to solrmarc...@googlegroups.com
Maybe there is an .exe file that you need to execute?

Robert Haschart

unread,
Apr 13, 2009, 9:54:10 AM4/13/09
to solrmarc...@googlegroups.com, matthew...@gmail.com
Matt,

The new 2.0 release of solrmarc should be able to read in valid MARCXML without a problem, and add it to a solr index. 
I can help you get it set up and working.

    -Bob Haschart

Matthew Bachtell

unread,
Apr 13, 2009, 10:32:41 AM4/13/09
to Robert Haschart, solrmarc...@googlegroups.com
That would be great. Do you need anything from me?

I have vufind installed on windows machine but do not have an
independent installation of solrmarc. Will I need to install this?

Matt
--
"A book is a fragile creature, it suffers the wear of time, it fears
rodents, the elements and clumsy hands. so the librarian protects the
books not only against mankind but also against nature and devotes his
life to this war with the forces of oblivion."
- Umberto Eco

Robert Haschart

unread,
Apr 13, 2009, 1:05:18 PM4/13/09
to Matthew Bachtell, solrmarc...@googlegroups.com
Matt,

I have just recently finished the SolrMarc 2.0 release, (as in last week) It includes a pre-built binary designed to work with VuFind, but I have not had time to work with Andrew Nagy (from VuFind) to include the new Solrmarc in with the VuFind release, so yes at this time you will have to do a separate installation of Solrmarc.

You can get the Binary SolrMarc build for VuFind at the following location:
 
http://solrmarc.googlecode.com/files/Binary_Generic_VuFind_SolrMarc_PC.tar.gz

The existing VuFind distribution has a directory named import, which contains a couple of  previous versions of the code to import records into VuFind.   Rename this directory from  "import"  to  "orig-import" .    Create a new directory named "import", and unpack the above binary distribution into that new directory.

Then open a command window and change the directory to the top-level of your VuFind installation, and run the following commands:

import\setsolrhome  ./solr
import\setsolrwar ./solr/jetty/webapps/solr.war

Then you should be able to index one of your MARCXML files with the following command:

import\indexfile  /path/to/marcxmlfile.xml


If this doesn't work and you can send me a small sample of your MARCXML records I will take a look at them and make sure that Solrmarc will be able to handle them. 

-Bob Haschart

Matthew Bachtell

unread,
Apr 15, 2009, 12:42:33 PM4/15/09
to Robert Haschart, solrmarc...@googlegroups.com
I completed steps as detailed and was given the following.

import\setsolrhome ./solr

C:\vufind>import\setsolrhome ./solr
'jar' is not recognized as an internal or external command
operable program or batch file.
jar = C:\vufind\import\Generic_VuFind_SolrMarc.jar
config = vufind_config.properties
solrpath = C:\vufind\solr
url = /update
'jar' is not recognized as an internal or external command
operable program or batch file.

C:\vufind>import\setsolrwar ./solr/jetty/webapps/solr.war
'jar' is not recognized as an internal or external command,
operable program or batch file.

when I try and run the xml (which i didn't think would work based on the above).
-Xmx512m) was unexpected at this time.

Matt

Robert Haschart

unread,
Apr 15, 2009, 5:56:56 PM4/15/09
to matthew...@gmail.com, solrmarc...@googlegroups.com
Matt,

I apologize.   I never realized that a Java Runtime Environment does not include the jar command, which
both setsolrhome and setsolrwar  rely on.   If you want to run those commands, you probably need to install
a Java Development Kit(JDK)  Additionally the second error you mention 
-Xmx512m) was unexpected at this time.

is a bug in the scripts.  There is now a new version of the solrmarc pre-built release available at:

http://code.google.com/p/solrmarc/downloads/list

that should have that particular problem fixed. 



Another option that might be much easier for you, is to run a different shell script.

If all you want to do is import MARC data into your solr index, you can run the script

import\import  \path\to\marcfile.mrc

or

import\import \path\to\marcfile.xml


That script was modifed from the one written and included in the VuFind distribution, and sets the solr war location
and the solr home location internally using enviroment variables and java system properties.

Sorry again for the problems,  I think you are the first "customer" of the new prebuilt binary SolrMarc for VuFind,
so there are some kinks that are being worked out.

Good luck,  and let me know if you have any further problems, (or even better let me know if this fixes your problem)

Matthew Bachtell

unread,
Apr 21, 2009, 2:41:24 PM4/21/09
to Robert Haschart, solrmarc...@googlegroups.com
Good Afternoon Rob/list,

I was away at training for the past couple of days and today was the
first day I could muck about with this.

It all works splendidly. I had to hardcode the VUFIND_HOME variable
in import.bat to my local installation location but everything else
worked swimmingly.

FYI for anyone else using OpenBiblio. If you would like to have the
MARCXML export php script for OpenBiblio please let me know. I am
going to try and provide this to OpenBiblio for the next release
candidate but I don't know when that will occur.

Matt

--

Ross Singer

unread,
Apr 24, 2009, 9:44:07 PM4/24/09
to solrmarc...@googlegroups.com
Eh, if you're using OpenBiblio... There is a Jangle connector for that:

http://code.google.com/p/jangle/source/browse/#svn/trunk/connectors/openbiblio

which will give you marcxml, marc21, mods, oai_dc, and rdf dc.

We had a meeting at Code4lib about SolrMarc handling a Jangle source
natively, but I'm not sure where things are with that (I sort of let
the ball drop on that).

Anyway, if you're interested in getting the Jangle connector up and
running, let me know.

-Ross.
Reply all
Reply to author
Forward
0 new messages