lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-810) provide a isClosed() method in Searcher class
Date Thu, 22 Feb 2007 19:54:05 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475141
] 

Hoss Man commented on LUCENE-810:
---------------------------------

please consult the java-user mailing list with questions for discussion before opening new
bugs/ feature request issues.

If you don't want an IndexReader to be closed when closing an IndexSearcher, this can be done
by using the IndexSearcher(IndexReader) constructor (an IndexSearcher will only close it's
IndexReader if it opened it in the first place)

Even if i've missudnerstood your question, and you absolutely need an isClosed() method, this
can easily be added by subclassing IndexSearcher in your application...


  public MySearcher extends IndexSearcher {
     /* ... define whatever constructors you want ... */
     boolean closed = false;
     public void close() {
        closed=true;
        super.close();
     }
     public isClosed() { return closed; }     
  }


> provide a isClosed() method in Searcher class
> ---------------------------------------------
>
>                 Key: LUCENE-810
>                 URL: https://issues.apache.org/jira/browse/LUCENE-810
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>    Affects Versions: 2.0.0
>         Environment: windows 2003, Jdk 5, Apache Tomcat 5.5.17
>            Reporter: mohammad norouzi
>
> In our project we need to build a searcher pooling system, so a isClosed() method is
required for testing if searcher is closed then try to re-open that. we dont want to close
IndexReader since it is fixed for a searcher.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message