Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How can I speed up reading the Lucene search results

Thread Tools

How can I speed up reading the Lucene search results

Posts: n/a
Reading lucene search hits results to xml slow slow. I need the xml
and can't find a way to convert the hits object directly to xml. So
now what?

Since there is no direct way to read it to xml, I have to first
convert the hits to a dataset then to xml. Here is what I am doing...

// execute the search
Hits _oWidgetHits =
_oLuceneIndexSearch.ExecuteSearch(_booleanqqueryWi dgetsQuery,

// read hit results
if (_oWidgetHits.Length() > 0)
for (int iResultsCount = 0; iResultsCount < _oWidgetHits.Length();
// get the document from index
Document _dResultsDoc = _oWidgetHits.Doc(iResultsCount);

// create a new row with the result data
DataRow _rWidgets = _dtSearchResults.NewRow();
_rWidgets["WidgetID"] = _dResultsDoc.Get("WidgetID");
_rWidgets["WidgetTitle"] = _dResultsDoc.Get("WidgetTitle");

// add row

return _dtSearchResults;

I have tried using the hitIterator but that give me no gains. I am
researching the hitCollector but that seems to be the same concept.

The problem with the speed really is the number of records. I have
reduced the results but that really is only a band-aid.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Need help with reading the lucene hits speed Java 0 03-05-2008 06:53 PM
Call Java from JavaScript, and get back results (Lucene) Javascript 1 04-13-2007 09:51 AM
Call Java from JavaScript, and get back results (Lucene) Java 0 04-11-2007 02:57 PM
how to use lucene api (Search Engine Java) Ezee Java 1 07-30-2005 07:32 PM