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 o
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 wan
Is this possible through lucene or has anybody tried such thing?
On 28/05/2009, Ritu choudhary 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
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
Yes, the getBestFragment() returns the matched fragment "fragmentcount"
numbers each separated with the "fragmentseparator".
what exactly you mean by "highlight the searched word in the document." what
is this document???
first let us know what exactly you want to with the search results.
--KK
On
The output i want is to show the text i searched let's say "search" in the
document where it occured. Like this:
the text i want to search is this and it should be highlighted as this .
Search currently is giving just the word "search". The result i want is to
highlight the searched word in the d
what exactly is your requirement?
Displaying the final search results in a webpage? or anything else.
The results that you are getting is correct. Now you have to decide what you
want to do with that.
I thought you are trying to show the results in a webpage.
--KK
On Thu, May 28, 2009 at 11:54 AM
no i am doing it on eclipse ganymede
On 28/05/2009, KK wrote:
> Forgot:
> Are you trying all this from command line? Because thats wehn you get the
> ouput as unprocessed html , those span tags, when you pass the same to
> display the content as a webpage they will be processed by the browser and
Forgot:
Are you trying all this from command line? Because thats wehn you get the
ouput as unprocessed html , those span tags, when you pass the same to
display the content as a webpage they will be processed by the browser and
you will see the colored matches.
--KK
On Thu, May 28, 2009 at 11:49
Yes , thats the expected output.
Now put that full content[whatever the searcer returned] in the html page
alongwith the styling for the same, and you will see the matches in yellow
[you chose yellow as color for highlighting].
--KK
On Thu, May 28, 2009 at 11:42 AM, Ritu choudhary wrote:
> I h
I have added the lines you suggested and now its giving the following
output , still can't get what's wrong...
THE CHANGES I HAVE DONE:
SimpleHTMLFormatter formatter =
new SimpleHTMLFormatter("",
"");
Highlighter highlighter = new Highlighter(formatter, new QueryScorer(query
Yes, your code is wrong!
Where is the highlighter span/formatter, because from your code what I can
see is that you are just passsing the score to Queryscorer, instead you
should pass both queryscore as well as formatter
>From my previous mail you can see the following code and mimic the same and
i
Am i coding it wrongly ...please reply.
Thank you so much for your patience and support but i am still not
getting the correct result. Here is my code can you please tell me
what wrong have i done in it? (I don't want to use
org.apache.search.hit so i have used terms in place of that)
package highlighted;
import java.io.FileWriter;
i
@Ritu
Wouter's reply must have fixed the problem, right? Or still stuck?
--KK
On Wed, May 27, 2009 at 1:46 PM, Wouter Heijke wrote:
> Hi,
> It sounds to me that you are highlighting the query string and not the
> document. You will have to pass the document's content to
> getBestFragments() and
Hi,
It sounds to me that you are highlighting the query string and not the
document. You will have to pass the document's content to
getBestFragments() and it will work I think.
Wouter
> hi there,
> I am using lucene highlighter to highlight the searched result
> but it shows only the query s
I want to confirm the output of the below statement , what i get into
"result" is just the word i am searching (let's say d word is
registered). How can i get the whole fragment in which the word is
found and show the highlighted word in that fragment or document.
String result =
highlighte
Hi ,
AFAIK, the default option is to bold the matched text. If you want to do
something else, say highlight it with some color then you have to do that
instead of doing the default bolding.
The following is a working example from LIA2ndEdn, [verbatim copy] for hit
highlighting.
import java.io.*;
i
hi there,
I am using lucene highlighter to highlight the searched result
but it shows only the query string in bold highlights.
IS THERE ANY WAY I CAN USE IT TO SHOW THE HIGHLIGHTED TEXT IN THE
DOCUMENT WHERE IT IS FOUND?
I need to show the searched terms in highlights in the
document where it
19 matches
Mail list logo