[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    RE: [DIH] Using SqlEntity to get a list of files and read files in XpathEntityProcessor
From:       jerome.dupont () bnf ! fr
Date:       2013-05-31 7:45:58
Message-ID: OF3CD4C3EF.0A74408A-ONC1257B7C.00297637-C1257B7C.002AA914 () LocalDomain
[Download RAW message or body]


Thanks very much, it works, with dataSource (capital S) !!!
Finally, I didn't have to define a "CHEMINRELATIF" field in the
configuration, it's working without it.

This is the definive working configuration:
		<dataSource name="accesPCN"
					type="JdbcDataSource"
					driver="oracle.jdbc.driver.OracleDriver"
					url="jdbc:oracle:thin:@host:port:db"
					user="secret"
					password="BNF"/>

		<dataSource name="racineNoticeDatasource"
baseUrl="file:///D:/jed/noticesBib" type="URLDataSource" encoding="UTF-8"/>

				<entity name="noticebib"
					dataSource="accesPCN"
					processor="SqlEntityProcessor"
					rootEntity="false"
					query="select DISTINCT
		SUBSTR( to_char(noticebib.numnoticebib, '999999999'), 3, 1) ||
'/' ||
		SUBSTR( to_char(noticebib.numnoticebib, '999999999'), 4, 1) ||
'/' ||
		SUBSTR( to_char(noticebib.numnoticebib, '999999999'), 5, 3) ||
'/' ||
		to_char(noticebib.numnoticebib) || '.xml' as CHEMINRELATIF
		from bnf.noticebib
		where numnoticebib = '30000001'"
					>

						<entity  name="processorDocument"
						processor="XPathEntityProcessor"
						dataSource="racineNoticeDatasource"
						url="/${noticebib.CHEMINRELATIF}"
						xsl="xslt/mnb/IXM_MNb.xsl"
						forEach="/record"

transformer="LogTransformer,fr.bnf.solr.BnfDateTransformer"
						logTemplate="Notice fichier: $
{noticebib.CHEMINRELATIF}" logLevel="debug"
						>

						<field column="Ark"
xpath="/record/IDPerenne" />
						<field column="NN"
xpath="/record/@Numero" />


Thanks again!

-----------------------------------------------
Jérôme Dupont
Bibliothèque Nationale de France
Département des Systèmes d'Information
Tour T3 - Quai François Mauriac
75706 Paris Cedex 13
téléphone: 33 (0)1 53 79 45 40
e-mail: jerome.dupont@bnf.fr
-----------------------------------------------


Exposition  Guy Debord, un art de la guerre  - du 27 mars au 13 juillet 2013 - BnF - \
François-Mitterrand / Grande Galerie Avant d'imprimer, pensez à l'environnement. =


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic