Hi Christophe
It looks like our solutions should fit together - I went ahead and did
the indexing and search implementations, on the meta-data, while you
went with the higher-level api, mostly focussed on the content.
Some things:
-- For some applications (e.g. mine), it's critical that indexing occur
within the transaction [i.e. SEARCH needs to reflect the exact store
state). A flag to indicate synchronous indexing?
-- Property typing is a must, I think. At least to be able to pull out
meaningful date-ordering, etc. I've got two (one rdbms, one non)
solutions in mind - I'll run them by you.
-- If we're serious about (possible) different indexers for a
combination of different stores, doesn't it make more sense to define
the indexers in a separate block (from the stores) in Domain.xml and
allow use references from the stores to the indexers?
There are already two mechanisms in place to control which indexer does
what, though: the search language used, and the fact that any BasicQuery
implementation "falls back" to another if it can't handle any part of
the search request. So, here's some use cases/config examples:
(1) dav:basicsearch on store highMetaStore uses by preference RDBMSQuery
(searches the indexes generated by RDBMSIndexer).
If RDBMSIndex can't handle any part of the query (i.e. a LIKE if we're
not using full-text indexes in the RDBMS), it falls through to
LuceneQuery >> LuceneIndexer
If THAT can't (although we're unlikely to get here), fall through to
BasicQuery
--- on highContentStore, it uses by preference LuceneQuery
---- on both stores, it uses by preference LuceneQuery (sum of
priorities)
(2) slide:metasearch ONLY uses RDBMSQuery, slide:contentsearch ONLY uses
LuceneQuery
So:
<store name="highMetaStore">
....
<query-resolvers>
<resolver
priority="30">org.apache.slide.search.impl.RDBMSQuery</resolver>
<resolver
priority="10">org.apache.slide.search.impl.LuceneQuery</resolver>
</query-resolvers>
....
</store>
<store name="highContentStore">
....
<query-resolvers>
<resolver
priority="10">org.apache.slide.search.impl.RDBMSQuery</resolver>
<resolver
priority="40">org.apache.slide.search.impl.LuceneQuery</resolver>
</query-resolvers>
....
</store>
<indexers>
<indexer class-name="org.apache.slide.search.impl.RDBMSIndexer">
<meta-types xmlns:d="DAV:"
xmlns:s="http://jakarta.apache.org/slide/">
<type qname="d:getlastmodified"
java-class="java.util.Date"/>
<type qname="d:getcontentlength"
java-class="java.lang.Long"/>
<type qname="s:lastmodified"
java-class="java.util.Date"/>
<type qname="s:password"
java-class="java.lang.String"/>
</meta-types>
<parameter name="asynchronous" value="false"/>
<parameter name="fullTextIndexing" value="false"/>
...
</indexer>
<indexer
class-name="org.apache.slide.search.impl.LuceneIndexer">
<parameter name="asynchronous" value="true"/>
...
</indexer>
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]