Hibernate Search Spell Check
by John Griffin
Guys,
Here's where I'm at. In the SearchFactoryImpl in the initDocumentBuilders
method once the document builders are created they contain an object that
has the name of any dictionary that was specified in their respective class
via the @AddToDictionary(name=".") anno. An entity can have multiple dicts
(names) specified and each entity can specify their own. The "name" param is
used to differentiate the words to search in the single index.
In the first iteration of code we are going to build the dictionary index in
the directory specified by the baseDir config param. (We can add dictionary
indexes later via configuration somehow.) So, if any of the entities contain
a dict name I'll need a DirectoryProvider for the baseDir and will pass a
String ("name") instead of a mappedXClass to the
factory.createDirectoryProviders method. So I'll have to overload the method
and eventually add the new provider to the other providers.
That's a lot of refactoring, any pointers to make it easier? Thoughts?
John G.
16 years, 2 months