Also, I did dig through the warnings in the fedoragsearch.log but didn't
encounter anything that seemed alarming.
From: Gottwig, Jeremy M. (GSFC-272.0)[ZAI] [mailto:[email protected]]
Sent: Friday, May 01, 2009 1:55 PM
To: Gert Schmeltz Pedersen; Fedora Users
Subject: Re: [Fedora-commons-users] Adding custom datastreams to GSearch...
Hello Gert,
I really appreciate you getting back to me on this.
My forgetting the <xsl:value-of select="text()"/> was poor transcribing on my
part. Sorry about that.
Anyway, here's what I have now:
<xsl:for-each
select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/custom//*">
<IndexField index="ANALYZED" store="YES"
termVector="YES">
<xsl:attribute name="IFname">
<xsl:value-of select="name()" />
</xsl:attribute>
<xsl:value-of select="text()"/>
</IndexField>
</xsl:for-each>
I've also tried putting modifying it to something like .../custom/author/* just
to see if I could focus it a little more directly toward the grandchildren but
to no avail.
I have this chunk of code under the template reading: <xsl:template
match="/foxml:digitalObject" mode="activeDemoFedoraObject">. Would it be
better off under its own template?
Thanks again,
Jeremy
From: Gert Schmeltz Pedersen [mailto:[email protected]]
Sent: Wednesday, April 29, 2009 4:13 AM
To: Gottwig, Jeremy M. (GSFC-272.0)[ZAI]; Fedora Users
Subject: RE: Adding custom datastreams to GSearch...
You probably looked into demoFoxmlToLucene.xslt, where the loop path is
.../oai_dc:dc/*, which will process all child elements of the oai_dc:dc
element, but not grandchildren and below. If you transfer that recipe to a case
with grandchildren like yours, you need to use .../custom//* . Besides, you
miss the line <xsl:value-of select="text()"/> here
</xsl:attribute>
<xsl:value-of select="text()"/>
</IndexField>
If you run with debug on, you will get some info in fedoragsearch.log, which
may help. If not, let me hear about it.
Best
Gert
From: Gottwig, Jeremy M. (GSFC-272.0)[ZAI] [mailto:[email protected]]
Sent: 28. april 2009 21:55
To: Fedora Users
Subject: [Fedora-commons-users] Adding custom datastreams to GSearch...
I've been performing some tests with GSearch, but I'm having some difficulties
indexing custom datastreams (probably because I have so little experience with
XSLT). I'm hoping that someone might be able to take a look at what I'm
messing with and tell me why it's wrong and possibly how to fix it.
Here's the code:
<xsl:for-each
select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/custom/*">
<IndexField index="ANALYZED" store="YES" termVector="YES">
<xsl:attribute name="IFname">
<xsl:value-of select="name()" />
</xsl:attribute>
</IndexField>
</xsl:for-each>
The custom metadata is pretty simple with a layout similar to this:
<custom xsi:schemaLocation="...xml">
<title>data</title>
<author>
<last>data</last>
<first>data</first>
</author>
</custom>
Because this is just testing, for now I just want to dump everything from the
datastream into the index.
At present, my attempts have failed to get the datastream into the index. I've
been making sure to restart Tomcat after making modification, and I've been
using Luke to examine the index.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users