[
https://issues.apache.org/jira/browse/SOLR-4764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Muir updated SOLR-4764:
------------------------------
Attachment: SOLR-4764.patch
Here is a patch. All tests pass.
A few notes:
* the init respects the existing 'reopenReaders' in solrconfig.xml, so if you
have that set to false, it still does the same thing as before.
* IndexReaderFactory gets a newReader(IndexWriter, ..) so that NRT users can
still customize the DirectoryReader being used.
* A few tests relied upon the fact that init didnt open an indexwriter:
MultiCoreExampleTestBase always created a core container and opened cores, so
this was moved to the embedded subclass which needs it. The ReplicationHandler
test and the TestArbitraryIndexDir just set reopenReaders=false because they
rely fundamentally on this 'readonly' case.
> When using NRT, just init the reader from IndexWriter
> -----------------------------------------------------
>
> Key: SOLR-4764
> URL: https://issues.apache.org/jira/browse/SOLR-4764
> Project: Solr
> Issue Type: Improvement
> Reporter: Robert Muir
> Attachments: SOLR-4764.patch, SOLR-4764_test.patch
>
>
> Spinoff from SOLR-4761
> Solr first opens a DirectoryReader from the directory, then later will pass
> this to IW openIfChanged.
> I noticed this when i was confused that mergedsegmentwarmer doesn't appear to
> work at first until after you've reopened...
> I'm not totally sure what the current behavior causes (does IW's pool reuse
> segments from this passed-in "external" reader, or is this causing some
> horrible doubling-up/inefficient stuff etc?). To some extent i think we
> should change it even if its actually performant: I think its confusing.
> I think ideally we'd change IndexReaderFactory's method to take writer
> instead of directory so that custom DirectoryReaders can still work.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]