Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Proposed changes to IIndexer interface

eyebrowse
Discussion topic

Back to topic list

Proposed changes to IIndexer interface

Reply

Author Leonard Richardson <leonardr at gogol dot humnet dot ucla dot edu>
Full name Leonard Richardson <leonardr at gogol dot humnet dot ucla dot edu>
Date 2002-09-16 19:01:35 PDT
Message I recently added code to IndexMaint to dynamically load the IIndexer
implementation from a class specified in eyebrowse.properties, so that I
could plug in an implementation other than LuceneIndexer. It turns out
that this isn't quite sufficient. I need to load different IIndexer
implementations for different activities. I resolved this problem by
splitting out IIndexer into three interfaces, each containing a subset of
the IIndexer functionality. The IIndexer interface itself has been
deprecated, in favor of these three interfaces:

IIndexSearcher:
 search(String)
 search(String, String)
 close()

IIndexCreator:
 createIndex()
 close()

IIndexWriter:
 indexMessage(String, MimeMessage)
 close()

[For reference, here's the old IIndexer:]
 createIndex()
 indexMessage(String, MimeMessage)
 search(String)
 search(String, String)
 close()

All three interfaces contain close() at Andreas Guenther's suggestion. I
wanted to put close() in a super-interface, but Andreas wouldn't hear of
it. :)

IndexMaint now has getIndexWriter(String), getIndexCreator(String), and
getIndexSearcher(String) methods which replace the now-deprecated
getIIndexer(String). You specify your implementations as "indexWriter",
"indexCreator", and "indexSearcher" in eyebrowse.properties (all three
default to LuceneIndexer, so unless you're doing something weird like me
you don't need to change anything). I've changed all references to
getIIndexer() in Eyebrowse so that they call the appropriate getIndexFoo()
method instead (corresponding to what they're about to do to the index).

I've talked this change over with Andreas and he's okay with it. So
barring objections, I'd like to commit my code tomorrow. Is this okay?

Leonard


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@eyeb​rowse.tigris.org
For additional commands, e-mail: dev-help at eyebrowse dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Proposed changes to IIndexer interface Leonard Richardson <leonardr at gogol dot humnet dot ucla dot edu> Leonard Richardson <leonardr at gogol dot humnet dot ucla dot edu> 2002-09-16 19:01:35 PDT
Messages per page: