You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "mohammad norouzi (JIRA)" <ji...@apache.org> on 2007/02/22 09:44:05 UTC

[jira] Created: (LUCENE-810) provide a isClosed() method in Searcher class

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


[jira] Commented: (LUCENE-810) provide a isClosed() method in Searcher class

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ 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


[jira] Resolved: (LUCENE-810) provide a isClosed() method in Searcher class

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved LUCENE-810.
-----------------------------

    Resolution: Won't Fix

> 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