There is nothing particularly magic to it.  It is just fills up
SolrParams directly (see any of the tests) calling the requestHandler,
then walking through the Documents.  Something like:


 SolrRequestHandler handler = core.getRequestHandler( "" ); // gets
the standard one

 SolrQueryResponse rsp = new SolrQueryResponse();
 core.execute( handler, sreq, rsp );

 IndexReader reader = sreq.getSearcher().getReader();
 DocListAndSet response = (DocListAndSet)rsp.getValues().get( "response" );
 DocIterator iter = response.docList.iterator();
 while( iter.hasNext() ) {
   Document doc = reader.document( iter.next() );
   // ...
 }

ryan


On 4/10/07, Daniel Einspanjer <[EMAIL PROTECTED]> wrote:
Ryan,

Do you have any of this code you could share?  I am currently using
Solr to perform thousands of queries in a batch, and eliminating the
HTTP overhead is something I'd love to do if it isn't complicated.  We
need several of the extra features Solr provides, which is why we are
trying to use it instead of Lucene directly.

On 4/2/07, Ryan McKinley <[EMAIL PROTECTED]> wrote:
> I have embedded solr skipping HTTP transport altogether.  It was
> remarkably easy to link directly to request handlers skipping the
> dispatch filter and using the DocList and associated data in the
> SolrQueryResponse directly.

Reply via email to