[ https://issues.apache.org/jira/browse/SOLR-5730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142109#comment-15142109 ]
Shai Erera commented on SOLR-5730: ---------------------------------- Few comments about the patch: * In QueryComponent: {{if\(existingSegmentTerminatedEarly == null\)}} -- can you add a space after the 'if'? * {{SortingMergePolicyFactory.getMergePolicy()}} calls {{args.invokeSetters(mp);}}, like {{UpgradeIndexMergePolicyFactory}}. I wonder if we can have a protected abstract {{getMergePolicyInstance(wrappedMP)}}, so that {{WrapperMergePolicyFactory.getMergePolicy()}} implements it by calling this method followed by {{args.invokeSetters(mp);}}. What do you think? * {{SolrIndexSearcher}}: {{qr.setSegmentTerminatedEarly\(earlyTerminatingSortingCollector.terminatedEarly\(\)\);}} -- should we also set {{qr.partialResults}}? * {{DefaultSolrCoreState}}: you can change the to: {code} public Sort getMergePolicySort() throws IOException { lock(iwLock.readLock()); try { if (indexWriter != null) { final MergePolicy mergePolicy = indexWriter.getConfig().getMergePolicy(); if (mergePolicy instanceof SortingMergePolicy) { return ((SortingMergePolicy) mergePolicy).getSort(); } } } finally { iwLock.readLock().unlock(); } } {code} * What's the purpose of {{enable="$\{solr.sortingMergePolicyFactory.enable:true\}"}}? * I kind of feel like the test you added to {{TestMiniSolrCloudCluster}} doesn't belong in that class. Perhaps it should be in its own test class, inheriting from this class, or just using {{MiniSolrCloudCluster}}? * {{RandomForceMergePolicyFactory}} is not really related to this issue. Perhaps you should commit it separately? > make Lucene's SortingMergePolicy and EarlyTerminatingSortingCollector > configurable in Solr > ------------------------------------------------------------------------------------------ > > Key: SOLR-5730 > URL: https://issues.apache.org/jira/browse/SOLR-5730 > Project: Solr > Issue Type: New Feature > Reporter: Christine Poerschke > Assignee: Christine Poerschke > Priority: Minor > Labels: blocker > Fix For: 5.5, master > > Attachments: SOLR-5730-part1and2.patch, SOLR-5730-part1of2.patch, > SOLR-5730-part1of2.patch, SOLR-5730-part2of2.patch, SOLR-5730-part2of2.patch > > > *Example configuration (solrconfig.xml) :* > {noformat} > -<mergePolicy class="TieredMergePolicy"/> > +<mergePolicyFactory class="org.apache.solr.index.SortingMergePolicyFactory"> > + <str name="wrapped.prefix">in</str> > + <str name="in.class">org.apache.solr.index.TieredMergePolicyFactory</str> > + <str name="sort">timestamp desc</str> > +</mergePolicyFactory> > {noformat} > *Example use (EarlyTerminatingSortingCollector):* > {noformat} > &sort=timestamp+desc&segmentTerminateEarly=true > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org