Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > How do i speed ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 15877 of 16486
Post > Topic >>

How do i speed up reading Lucene search results

by rhino1130 <rboeckmann@[EMAIL PROTECTED] > Mar 12, 2008 at 08:55 AM

Reading lucene search hits results to xml VERY slow. How do I speed it
up?  Yes I have to read them to xml.  I also 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(_booleanqqueryWidgetsQuery,
INDEXPATH);

  // read hit results
  if (_oWidgetHits.Length() > 0)
  {
    for (int iResultsCount = 0; iResultsCount < _oWidgetHits.Length();
iResultsCount++)
    {
      // get the do***ent from index
      Do***ent _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
      _dtSearchResults.Rows.Add(_rRecipe);
    }
  }

  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 issue is the hits object really doesn't help.  What I need is an
xml object.  So I convert the hits to a dataset and that to xml.  To
complicate things, the term searched in my boolean query is returning
32,000 records. Do I need them all?  Probably not but I have to return
them in my webservice.
 




 5 Posts in Topic:
How do i speed up reading Lucene search results
rhino1130 <rboeckmann@  2008-03-12 08:55:24 
Re: How do i speed up reading Lucene search results
Roedy Green <see_websi  2008-03-13 05:13:27 
Re: How do i speed up reading Lucene search results
grasp06110 <grasp06110  2008-03-13 03:29:27 
Re: How do i speed up reading Lucene search results
rhino1130 <rboeckmann@  2008-03-21 13:40:21 
Re: How do i speed up reading Lucene search results
Rob <cbmc64@[EMAIL PRO  2008-03-26 10:00:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 21:04:06 CDT 2008.