Closed LeMoussel closed 4 years ago
I think it's the more elegant way to do it with no JAVA code:
<importer>
<preParseHandlers>
<tagger class="com.norconex.importer.handler.tagger.impl.ConstantTagger">
<constant name="H2Datastore">$h2datastore</constant>
</tagger>
</preParseHandlers>
<postParseHandlers>
<tagger class="com.norconex.importer.handler.tagger.impl.KeepOnlyTagger">
<fields>
title,
description,
H2datastore,
</fields>
</tagger>
</postParseHandlers>
</importer>
I do not get what you are trying to do. If you simply want to send to your committer the path to the crawlstore that was used, then doing it via the importer like you suggest seems like a better idea indeed. But if you are simply curious to know where a document came from, you can also define any name as a constant, like "sourceCrawler=MyCrawlerId".
OK. Thanks for your support.
I use JDBC as Data Store Factory (use H2).
I create my own "Committer" and I would like to access the H2 database in this comitter. To do this I did like this.
In my own "Committer" I do this
I don't find it very portable. Is there a more elegant way to do it?