Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4, 4.0-ALPHA
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      An IndexReaderFactory can be used by IndexWriter and DirectoryReader to enable subclasses of DR to be instantiated by Lucene, automatically.

      1. LUCENE-3498.patch
        33 kB
        Jason Rutherglen
      2. LUCENE-3498.patch
        34 kB
        Jason Rutherglen
      3. LUCENE-3498.patch
        27 kB
        Jason Rutherglen
      4. LUCENE-3498.patch
        14 kB
        Jason Rutherglen

        Activity

        Hide
        Jason Rutherglen added a comment -

        Removed SolrIndexReaderFactory, instead SolrCoreAware is used for the exact same purpose.

        Nice.

        Show
        Jason Rutherglen added a comment - Removed SolrIndexReaderFactory, instead SolrCoreAware is used for the exact same purpose. Nice.
        Hide
        Jason Rutherglen added a comment -

        Added a new [backwards compatibility] SolrIndexReaderFactory that accepts a Solr core as a parameter.

        All tests pass.

        Show
        Jason Rutherglen added a comment - Added a new [backwards compatibility] SolrIndexReaderFactory that accepts a Solr core as a parameter. All tests pass.
        Hide
        Jason Rutherglen added a comment -

        The current Solr IndexReaderFactory can be deprecated and / or replaced with one that accepts a Solr core.

        Show
        Jason Rutherglen added a comment - The current Solr IndexReaderFactory can be deprecated and / or replaced with one that accepts a Solr core.
        Hide
        Jason Rutherglen added a comment -

        Also, the patch is against 3.x.

        Show
        Jason Rutherglen added a comment - Also, the patch is against 3.x.
        Hide
        Jason Rutherglen added a comment -

        Added support for attaching the new Lucene IndexReaderFactory to a Solr index at the solrconfig.xml level. All tests pass.

        Show
        Jason Rutherglen added a comment - Added support for attaching the new Lucene IndexReaderFactory to a Solr index at the solrconfig.xml level. All tests pass.
        Hide
        Robert Muir added a comment -

        (readerTermsIndexDivisor, termIndexInterval,

        This stuff needs to die, it only makes sense for specific codecs.

        For example, I'm pretty sure neither divisor nor interval make sense for the default terms implementation in trunk.

        Show
        Robert Muir added a comment - (readerTermsIndexDivisor, termIndexInterval, This stuff needs to die, it only makes sense for specific codecs. For example, I'm pretty sure neither divisor nor interval make sense for the default terms implementation in trunk.
        Hide
        Jason Rutherglen added a comment -

        Simon, I think you'd be surprised at how many of the current [uber-complex] features of Lucene, few people use (readerTermsIndexDivisor, termIndexInterval, mergedSegmentWarmer are great examples, that are not-so-complex in IWC alone). For people who use this, the factory system is a lot more user friendly than subclassing.

        A protected method in IW doesn't take into account opening a DR from a DR, to do that please commit LUCENE-3497. If that gets in, we can open an issue to add a protected method to IW.

        Show
        Jason Rutherglen added a comment - Simon, I think you'd be surprised at how many of the current [uber-complex] features of Lucene, few people use (readerTermsIndexDivisor, termIndexInterval, mergedSegmentWarmer are great examples, that are not-so-complex in IWC alone). For people who use this, the factory system is a lot more user friendly than subclassing. A protected method in IW doesn't take into account opening a DR from a DR, to do that please commit LUCENE-3497 . If that gets in, we can open an issue to add a protected method to IW.
        Hide
        Simon Willnauer added a comment -

        Instead of adding this factory can't we have a protected DirectoryReader create(..) method in IndexWriter you can override if you really need this. This is way way expert so I don't expect a lot of people use this feature. to open a reader you can then add some static factories in your own code?

        Show
        Simon Willnauer added a comment - Instead of adding this factory can't we have a protected DirectoryReader create(..) method in IndexWriter you can override if you really need this. This is way way expert so I don't expect a lot of people use this feature. to open a reader you can then add some static factories in your own code?
        Hide
        Jason Rutherglen added a comment -

        I think the Solr one could be made better, by passing in the core that's creating it. In that regard, Solr's can be improved rather than nuked.

        Show
        Jason Rutherglen added a comment - I think the Solr one could be made better, by passing in the core that's creating it. In that regard, Solr's can be improved rather than nuked.
        Hide
        Jason Rutherglen added a comment -

        Here's a first cut and all tests pass!

        Show
        Jason Rutherglen added a comment - Here's a first cut and all tests pass!

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Rutherglen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development