Searching during postcommit

2011-04-12 Thread Reeza Edah Tally
Hi,

 

I have been trying to perform a search using a CommonsHttpSolrServer when my
postCommit event listener is called.

I am not able to find the documents just commited; the "post" in postCommit
caused me to assume that I would; it seems that the commit only takes effect
when all postCommit have returned.

 

Am I missing something or is there another way I can do this?

 

Thanks,

Reeza



RE: Searching during postcommit

2011-04-13 Thread Reeza Edah Tally
Thanks,

I changed my searching to be triggered on a newSearcher event instead and
use the new searcher to retrieve the documents. This works.

Btw can I assume that a new searcher will always be created soon after a
commit?

Regards,
Reeza

-Original Message-
From: Otis Gospodnetic [mailto:otis_gospodne...@yahoo.com] 
Sent: Wednesday, April 13, 2011 3:54 AM
To: solr-user@lucene.apache.org
Subject: Re: Searching during postcommit

If I follow things correctly, I think you should be seeing new documents
only 
after the commit is done and the new index searcher is open and available
for 
search.  If you are searching before the new searcher is available, you are 
probably still hitting the old searcher.

Otis

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



- Original Message 
> From: Reeza Edah Tally 
> To: solr-user@lucene.apache.org
> Sent: Tue, April 12, 2011 9:25:59 AM
> Subject: Searching during postcommit
> 
> Hi,
> 
> 
> 
> I have been trying to perform a search using a  CommonsHttpSolrServer when
my
> postCommit event listener is called.
> 
> I  am not able to find the documents just commited; the "post" in
postCommit
> caused me to assume that I would; it seems that the commit only  takes
effect
> when all postCommit have returned.
> 
> 
> 
> Am I missing  something or is there another way I can do this?
> 
> 
> 
> Thanks,
> 
> Reeza
> 
> 




Do EntityProcessor honor onError=skip when nextRow() fails?

2011-04-14 Thread Reeza Edah Tally
Hi,

 

The document that I am trying to index with DIH contains an entity with
fields queried from a DB and an entity with the content of a file extracted
with TikaEntityProcessor. I was testing the onError="skip" option with
TikaEntityProcessor and found out it does not work. It basically behaves
like an onError="continue". I.e. the document still ends up in my index with
the DB fields but no file content. This is a problem because my index is
inconsistent with respect to my business data.

 

It seems that the issue lies in EntityProcessorWrapper which swallows
exceptions from nextRow() unless onError="abort". So is it safe to say that
this option just does not work? Can somebody please suggest an alternative
that would enable me to import all or nothing?

 

1 more observation: TikaEntityProcessor line 132 does not close the
InputStream in a finally clause; if parsing fails it remains open.

 

Thanks,

Reeza