lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ritu choudhary <ritu.it...@gmail.com>
Subject Re: highlighting searched results in document
Date Thu, 28 May 2009 09:36:52 GMT
No i am not indexing the html tags here. I just want to highlight the
searched word in the html or xml file(the file from which the index
was created) ,can't i trace that? Is there any function to trace the
positions of the term stored in lucene index to find where it actually
is in the file? Can one go to the position of the term in the document
the highlight it. Please help.

On 28/05/2009, KK <dioxide.software@gmail.com> wrote:
> As I know, you extract the text out of html pages, I dont think you want to
> index the tags as well, right?
> So what gets indexed by lucene is just the text and what you get as search
> result is what you've indexed.
> I'm repeating myself, once you have the search result, its upon you to do
> what you want with that.
> No body indexes the raw html/xml etc. You index the body/title etc . But if
> your requirement is to index the raw html file, then wait for someone else
> to respond.
> As far as the power of lucene is concerned, it can do almost anything on
> indexing/searching. Its limited because of the way one makes use of it and
> not due to the functionality/adaptabiliy of lucene.
>
>> . I want to open the document ,the real .xml or .html page where the
>> term was found and show the term  being highlighted (in say yellow
>> color).
>
> First make yourself clear about what you want at the end of the day, then
> try to get that done.
>
> --KK
>
> On Thu, May 28, 2009 at 1:16 PM, Ritu choudhary <ritu.itzme@gmail.com>wrote:
>
>> Is this possible through lucene or has anybody tried such thing?
>>
>> On 28/05/2009, Ritu choudhary <ritu.itzme@gmail.com> wrote:
>> > well friend let me explain the whole thing to you then:
>> >
>> > i created lucene index out of some .xml and .html files and i also
>> > checked this index through luke and its pretty alright till here .  I
>> > searched the terms and can find them too but how do i use this result
>> > . I want to open the document ,the real .xml or .html page where the
>> > term was found and show the term  being highlighted (in say yellow
>> > color).
>> >
>> > but what i am getting is just the word not the fragment or say
>> > document  where it occurs . How do i achieve this? I am really stuck .
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message