lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasun Gajasinghe <>
Subject Write QueryParser in JavaScript and use Lucene JAVA Indexer for searching
Date Sat, 03 Jul 2010 22:14:03 GMT
I need to add a completely client-side search mechanism to a help system that
I'm implementing for a Google Summer of Code project for DocBook. I use an
Ant script to run xslts that generate html from DocBook XML. I can use a
Java indexer to index the html, but when performing the search, I need to
access the index via JavaScript. There is no way of invoking a Java code and
NO server-side calls can be used. This allows users to use the documentation
even through local filesystem without any problem. I do understand it's a
difficult requirement to achieve, but there is no other option. I'm willing
to code on low-level with use of Lucene API for this.

My questions are:

   - Is there a way to build the index with a structure I define? Lucene
   creates its index in a binary format, which I cannot access using
   JavaScript. Therefore, I would have to edit Lucene backend classes to have a
   customized index in a plain text format. If this lets me benefit from
   Lucene's many strengths (stemming, cjk support), It's well worth my time to
   do it. So my question is: what java files do I need to edit? I see that the
   IndexFiles class does the indexing. I need to find what specific classes are
   involved when writing out the index.
   - I know that there is no JavaScript implementation available for Lucene
   QueryParser (or if there's one, please let me know!). So which classes
   should I study to reimplement them in JavaScript?
   - Are there any other concerns regarding this approach? I'm not sure that
   this will ultimately be feasible. I have about one month to do the
   implementation, so I'm trying to determine if this approach is worth
   persuing or if I should take another approach.

Lucene is a great tool. I'm happy to contribute back whatever I can do in
making use of it.

Thanks for any help you can give me to get me started in this.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message