Hello there and welcome to LQ. Hope you like it here.
create a .chm file from html
AFAIK there is one CHM compiler for GNU/Linux:
DocBook Toolchain Manager. If it don't work for you and you can not resolve issues with the developers or maintainers then maybe you can run a freeware CHM compiler under WINE if you can't shake your Winhelp format addiction.
I need to do this because html format does not show index and does not have convenient search
What I remember from building CHM files from HTML is that you would have to *make* an index: it's not something that happened automagically. And AFAIK search functionality is a part of the application, not of an individual .chm file. The search database must be built afterwards, similar to how "makewhatis" for example works. If your only concern is search functionality there's lots of desktop search products, see for example
http://www.antezeta.com/desktop-search.html or search Freshmeat and Sourceforge.