hi,
I do not have a shocking new insight but I do have some comment on the xslt.
It can be made more readable by using attribute value templates, e.g.
<field index="TOKENIZED" store="YES" termVector="NO" name="dsm.{@ID}">
so you don't need the <xsl:attribute> element. Note the curly braces.
This can be done in many places in nearly all of the the example xslt's.
You can also cover both control-groups M and E with
<xsl:for-each select="foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E']">
or, using xslt 2.0 (I suppose that's possible because Fedora uses Saxon; don't forget to change the version attribute on the stylesheet):
<xsl:for-each select="foxml:datastream[@CONTROL_GROUP=('M','E')]">
Egbert Gramsbergen
________________________________
From: Simon W Lamb [mailto:S.Lamb@...]
Sent: woensdag 24 maart 2010 18:00
To: tasai Kan; fedora-commons-users@...
Subject: Re: [Fedora-commons-users] How to index pdf using Solr andFedoraGeneric Search?
Hi Tasai,
Have you tried modifying the managed content example to something like this:-
<xsl:for-each select="foxml:datastream[@CONTROL_GROUP='E']">
<field index="TOKENIZED" store="YES" termVector="NO">
<xsl:attribute name="name">
<xsl:value-of select="concat('dsm.', @ID)"/>
</xsl:attribute>
<xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
</field>
</xsl:for-each>
This will loop through all the Externally referenced datastreams in the FOXML and call the getDatastreamText java method upon it. This should work at indexing externally referenced content as getDatastreamText uses the Fedora SOAP client to access the content datastream. If this still fails, it might be worth checking repository.properties file within your FedoraGSearch web app to check that the username/password etc.. are correct.
Hope this helps.
Simon Lamb
Software Developer
Academic Services || IT Systems || The University of Hull
T. +44 (0) 1482 462076
s.lamb@...|| http://www.hull.ac.uk/acs
Customer Support. +44 (0) 1482 462010 || help@... || http://www.hull.ac.uk/help
From: tasai Kan [mailto:kantasai@...]
Sent: 24 March 2010 03:56
To: fedora-commons-users@...
Subject: [Fedora-commons-users] How to index pdf using Solr and FedoraGeneric Search?
Hello guys.
I read demoFoxmlToSolr.xslt file and it show that there is a way to index pdf file but the pdf file should be a managed stream.
However i want to index pdf file which is an "Externally Referenced Content" stream.
Is there anyway to do that?
Thanks in advance.
(I'm using Fedora 3.3, Solr 1.3 and fgSearch 2.2)
________________________________
Windows Live: Make it easier for your friends to see what you're up to on Facebook. <http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009>
|