You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by William W <wi...@hotmail.com> on 2002/04/17 17:11:04 UTC

Searcher.close()

I have a problem using the Hits-Object:
If I put my search result as an Attribute in a Session, i can access the 
numbers and scores, but not any document via Hits.doc(...). I get  an 
exception like
Bad file descriptor
java.io.IOException:
    at java.io.RandomAccessFile.seek(Native Method)
    at com.lucene.store.FSInputStream.seekInternal(FSDirectory.java:177)

To solve this problem, I'm not closing the IndexSearcher instance.
Will I have problem with the "commit.lock" file ?

Thanks,
William.



_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Searcher.close()

Posted by Otis Gospodnetic <ot...@yahoo.com>.
--- William W <wi...@hotmail.com> wrote:
> I have a problem using the Hits-Object:
> If I put my search result as an Attribute in a Session, i can access
> the 
> numbers and scores, but not any document via Hits.doc(...). I get  an
> 
> exception like
> Bad file descriptor
> java.io.IOException:
>     at java.io.RandomAccessFile.seek(Native Method)
>     at
> com.lucene.store.FSInputStream.seekInternal(FSDirectory.java:177)
> 
> To solve this problem, I'm not closing the IndexSearcher instance.
> Will I have problem with the "commit.lock" file ?

You shouldn't.
You can search while the index is being modified.
Note that you will not see index changes (e.g. new Documents added to
the index since you opened your Searcher) if you don't close and
re-open the Searcher when the index changes.
Check list archives for more info.

Otis


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>