[EasyHack] #44681 port to CLucene from java/Lucene

Gert van Valkenhoef g.h.m.van.valkenhoef at rug.nl
Sun Feb 19 09:49:05 PST 2012


Thanks again for the help. Attached a new series of patches (cumulative 
with the previously sent ones and Caolan's), in which (I think) all the 
Java invocations have been removed in favor of using the C++ components:

  1) Implemented the 'resultsforquery.cxx' using CLucene. This adds the 
HelpSearch class to the source tree.

  2) Removed UNIX-specific code for directory access, now using OSL.

  3) Fixed a bug in UOString -> TCHAR* conversion.

The remaining problems are:

  1) I haven't implemented the XInvocations stuff. What's the point of 
doing that? The code is a lot simpler if HelpIndexer/HelpSearch are 
invoked directly. Is there a scripting interface to either of these 
components or something? If so, how do I test it?

  2) CLucene is still not built as part of the build process.

  3) When creating the CLucene FileReader (HelpIndexer.cxx), the path is 
converted to plain ASCII, that's probably dangerous. There is probably a 
way to work around this, but I haven't gotten around to it yet.

Unfortunately the patches are not as well-tested as I'd like, a new 
build is still running and I'm out of time, so YMMV.

On 02/15/2012 01:59 PM, Caolán McNamara wrote:
> On Tue, 2012-02-14 at 22:27 +0100, Gert van Valkenhoef wrote:
>> 1. how to convert the rtl::UOString to the TCHAR* that CLucene needs.
There was a small bug here (null-termination character was not being 
copied along with the rest of the string), fixed.
>> 2. In xmlhelp/source/cxxhelp/provider/makefile.mk, I've hacked the
>> include path to include l10ntools/source/help
> Attached patch hopefully basically takes care of those two
>
Great, I wouldn't have figured that out on my own :-)
>> 3. The conversion from using UNIX dirent.h and friends to using 'sal'
>> still needs to happen, and I think that will help get rid of some
>> awkward string conversions too.
> Straight forward enough, e.g. search for FiltersTest::recursiveScan on
> http://opengrok.libreoffice.org for similar.
Indeed, done.
> C.



More information about the LibreOffice mailing list