lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENE-3734) Allow customizing/subclassing of DirectoryReader
Date Wed, 01 Feb 2012 10:42:58 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-3734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Uwe Schindler resolved LUCENE-3734.
-----------------------------------

    Resolution: Fixed

Committed trunk revision: 1239043
                
> Allow customizing/subclassing of DirectoryReader
> ------------------------------------------------
>
>                 Key: LUCENE-3734
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3734
>             Project: Lucene - Java
>          Issue Type: Sub-task
>          Components: core/index
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0
>
>         Attachments: LUCENE-3734.patch
>
>
> DirectoryReader is final and has only static factory methods. It is not possible to subclass
it in any way.
> The problem is mainly Solr, as Solr accesses directory(), IndexCommits,... and therefore
cannot work on abstract IndexReader anymore. This should be changed, by e.g. handling reopening
in the IRFactory, also versions, commits,... Currently its not possible to implement any other
IRFactory that returns something else.
> On the other hand, it should be possible to "wrap" a DirectoryReader / CompositeReader
to handle filtering of collection based information (subreaders, reopening hooks,...). This
can be done by making DirectoryReader abstract and let DirectoryReader.open return a internal
hidden class "StandardDirectoryReader". This is similar to the relatinship between IndexReader
and hidden DirectoryReader in the past.
> DirectoryReader will have final implementations of most methods like getting document
stored fields, global docFreq and other statistics, but allows hooking into doOpenIfChanged.
Also it should not be limited to SegmentReaders as childs - any AtomicReader is fine. This
allows users to create e.g. a Directory-based ParallelReader (see LUCENE-3736) that supports
reopen and (partially commits).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message