[jsword-devel] Search Highlight

Tonny Kohar tonny.kohar at gmail.com
Wed Apr 29 01:06:49 MST 2009


On Mon, Apr 27, 2009 at 4:42 PM, Tonny Kohar <tonny.kohar at gmail.com> wrote:
> My initial finding seem there is no need for API change, what it needs
> is simple a new package eg: o.c.jsword.index.highlight
> and inside that package there is a static/factory/builder Highlight
> class which accept either (raw text, OSIS xml, or html output).
> ....

After tried that approach for few days, sorry that one does not works
:), since it is not based on the original index.

So I tried another approach by patching the LuceneIndex and trying to
store (in array/map) the Doc.FieldContent which matched the query, to
avoid changing the index structure (eg: adding positional field). And
applying that into the osis xml text, this approach does not work
either (or have difficulty mapping it back) if the query is phrase
because of the osis xml structure eg: a word can be surrounded with
lemma/strong tag, but this works for fuzzy search (non phrase)

So I guess I will another approach in the next few days, if still
couldn't get it right then I guess I will put aside that search
highlight due to the complexity involved and revisit later.

Tonny Kohar

More information about the jsword-devel mailing list