You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Lars Martin <La...@smb-tec.com> on 2004/05/28 18:08:04 UTC

WS on top of Lucene

Hi list.

Does anybody have experiences with a SOAP/WS interface based on
Axis on top of Lucene? I do have the problem to provide indexing
and searching for PHP and Delphi based applications so SOAP was
my first choice. Everything works fine on serverside when I call
the main method for testing. If i call exactly the same methods
from clientside via Axis I do get some cached data (e.g. documents
count, ..). Could that be a problem of threads?

The SOAP clientside calls:

  Content c = new Content();
  // ... fill the content
  // add the document to the index
  ir.addContent( c );
  Content d = new Content();
  // ... fill the content
  // add the document to the index
  ir.addContent( d );
  // print the number of documents
  System.out.println( "documents: " + ir.getNumDocs() );
  // the output is "documents: 1"

The SOAP serverside calls

// recieve the first client call to add a document
[WARN] ContentIndex: creating a new index...
   IndexWriter writer = new IndexWriter( ... );
   IndexReader reader = IndexReader.open().numDocs();
[WARN] ContentIndex: documents before adding Document: 0
   writer.addDocument( document );
[WARN] ContentIndex: document was added successfully...!
   IndexReader reader = IndexReader.open().numDocs();
[WARN] ContentIndex: documents before closing IndexWriter: 1
   writer.close();
   IndexReader reader = IndexReader.open().numDocs();
[WARN] ContentIndex: documents after closing IndexWriter: 1

// recieve the second client call to add a document
   IndexWriter writer = new IndexWriter( ... );
   IndexReader reader = IndexReader.open().numDocs();
[WARN] ContentIndex: documents before adding Document: 0
   writer.addDocument( document );
[WARN] ContentIndex: document was added successfully...!
   IndexReader reader = IndexReader.open().numDocs();
[WARN] ContentIndex: documents before closing IndexWriter: 1
   writer.close();
   IndexReader reader = IndexReader.open().numDocs();
[WARN] ContentIndex: documents after closing IndexWriter: 1

If I shutdown the Jetty Servlet Engine and restart it, there
are 2 (!) documents in the index.

Did I missunderstand something?

Maybe this is more a SOAP/Axis question but somewhere I had to
start digging ...

Regards, Lars

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org