Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3322

Add more context to IndexReaderFactory.newReader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0-ALPHA
    • 4.0-ALPHA
    • None
    • None

    Description

      In some situations where a custom IndexReaderFactory is used the amount of information passed to the newReader(..) call is too small. E.g. if a factory needs to access some external data that depends on schema or even on the collection name then it has no way to obtain that context.

      We cannot use SolrCoreAware here because this method is called before SolrCore is ready.

      I propose to simply change the signature and add a SolrCore argument. Even though SolrCore is not fully valid at this point, still the most useful properties there are valid (schema, descriptor, config, etc...).

      Attachments

        1. SOLR-3322.patch
          3 kB
          Andrzej Bialecki

        Activity

          People

            ab Andrzej Bialecki
            ab Andrzej Bialecki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: