You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Kasun Gajasinghe <ka...@gmail.com> on 2010/07/04 00:14:03 UTC

Write QueryParser in JavaScript and use Lucene JAVA Indexer for searching

Hello,
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.

/KasunBG

Re: Write QueryParser in JavaScript and use Lucene JAVA Indexer for searching

Posted by Kasun Gajasinghe <ka...@gmail.com>.
This is a reminder, as the mail was sent in the weekend! Please go through
it and suggest me a solution.

Thanks in advance,
/KasunBG


On Sun, Jul 4, 2010 at 3:44 AM, Kasun Gajasinghe <ka...@gmail.com> wrote:

> Hello,
> 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.
>
> /KasunBG
>

Re: Write QueryParser in JavaScript and use Lucene JAVA Indexer for searching

Posted by Kasun Gajasinghe <ka...@gmail.com>.
This is a reminder, as the mail was sent in the weekend! Please go through
it and suggest me a solution.

Thanks in advance,
/KasunBG


On Sun, Jul 4, 2010 at 3:44 AM, Kasun Gajasinghe <ka...@gmail.com> wrote:

> Hello,
> 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.
>
> /KasunBG
>