Hi,
I just checked in some stuff about indexing. In Domain.xml you may say:
<definition>
<store name="jdbc" classname="org.apache.slide.store.BindingStore">
<nodestore classname="org.apache.slide.store.impl.rdbms.JDBCStore">
<parameter name="driver">com.mysql.jdbc.Driver</parameter>
<parameter
name="url">jdbc:mysql://localhost:3306/test?autoReconnect=true</parameter>
<parameter name="user">wam</parameter>
<parameter name="password"/>
<parameter
name="adapter">org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter</parameter>
</nodestore>
<securitystore>
<reference store="nodestore"/>
</securitystore>
<lockstore>
<reference store="nodestore"/>
</lockstore>
<revisiondescriptorsstore>
<reference store="nodestore"/>
</revisiondescriptorsstore>
<revisiondescriptorstore>
<reference store="nodestore"/>
</revisiondescriptorstore>
<contentstore classname="org.apache.slide.store.txfile.TxFileContentStore">
<parameter name="rootpath">mysql/store/content</parameter>
<parameter name="workpath">mysql/work/content</parameter>
</contentstore>
<!-- no propertiesindexer specified, default is loaded. -->
<contentindexer classname="org.apache.slide.index.SampleIndexer">
<parameter name="myParm1">myVal1</parameter>
</contentindexer>
</store>
<scope match="/" store="jdbc"/>
</definition>
With this configuration the class "org.apache.slide.index.SampleIndexer" is loaded and
called for each storeRevisionContent(), createRevisionContent() and
removeRevisionContent.
For properties no indexer is configured in this example, a default indexer is called.
This indexer checks, if the associated store (in this case the JDBC store) implements
the
interface IBasicExpressionFactoryProvider. As the JDBC store does not yet provide
basic
search facilities, this interface is not implemented, the generic search would be used.
An Indexer now must implement the new interface IBasicExpressionFactoryProvider, the
IndexStore.drop() method now takes Uri and NodeRevisionNumber as parameter.
If an Indexer shall take part at the two phase commit, overwrite the XA methods
of AbstractService.
With this version it is not yet possible to define an Indexer outside the <store>
context.
Christophe, could you integrate your Lucene Indexer with that? You may take the
SampleIndexer
as a starting point, ignore the two phase commit stuff at the moment. The query stuff
is
not yet really ready, so just let the getExpressionFactory() method return null.
Any comments?
Regards,
Martin
__________________________
Martin Wallmer
Research & Development
Software AG ++49 6151 92 1831
Uhlandstr. 12
D 64297 Darmstadt
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]