[fpc-pascal] How create a full text search with TChmWriter?
Andrew Haines
AndrewD207 at aol.com
Tue Feb 21 02:15:41 CET 2012
On 02/20/12 18:00, Mattias Gaertner wrote:
> Hi,
>
> I'm using TChmWriter to pack some html files into a chm file.
> The index works. I don't have a TOC.
> Now I want a full text search.
>
> I set Writer.FullTextSearch to true, it takes a long time to
> process and the resulting chm is 30% bigger than the total of all
> files. So I guess it has created some index.
>
> But in lhelp I don't see a search, only the index.
>
> chmmaker can show a search for the example.chm, but can not find
> anything.
>
> Has someone an example how to create a chm file with full text search?
>
>
As far as I know setting FullTextSearch, before you call execute, should
create the search index. Also the files should match "*.ht" to be
included in the search index.
use chmls and see if the file $FIftiMain exists in it. That is the file
that contains the search index.
In fpc/packages/chm/src there is chmfilewriter.pas which chmcmd uses to
create chm's.
Andrew
More information about the fpc-pascal
mailing list