I think the problem is that he is calling getBestFrags on every hit
result for 200 page documents. So he is probably getting the document
for every result and running the Highlighter on each. Thats some slow
stuff there. The first simple thought is to page your results and only
getBestFrags for the number of hits that fit the page. As Grant
suggested you might also see if the TokenSources class helps you any.
The gist of the problem is that what you are trying to do is quite
computationally expensive. Your going to have to make a couple
compromises...but they may not be so bad.
- Mark
Grant Ingersoll wrote:
Are you just trying to search or are you trying to highlight?
Usually, you do your search, and then highlight 1 or more documents.
You can also speed up highlighting by using term vectors.
-Grant
On Jan 8, 2008, at 9:38 AM, Yannick Caillaux wrote:
Hello,
First, sorry for my bad english.
I have an index including 100 Dublin Core notices. I indexed
title,creator.... and I added a field "fulltext" containing the PDF
document referenced by the DC notice. (A PDF document is about 200
pages)
There's no problem to index them. But when I try to search using
org.apache.lucene.search.highlight.Highlighter.getBestFragments (or
getBestFragment), this method is very long (about 150 ms). So it
takes 15s when I have 100 results!
If I don't use this method the performance is very good.
Is there something to do to improve performance using this method?
Thank you
--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------
Grant Ingersoll
http://lucene.grantingersoll.com
http://www.lucenebootcamp.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]