msokolov commented on a change in pull request #2256:
URL: https://github.com/apache/lucene-solr/pull/2256#discussion_r568113101



##########
File path: lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
##########
@@ -941,6 +969,11 @@ public IndexWriter(Directory d, IndexWriterConfig conf) 
throws IOException {
     // obtain the write.lock. If the user configured a timeout,
     // we wrap with a sleeper and this might take some time.
     writeLock = d.obtainLock(WRITE_LOCK_NAME);
+    if (config.getIndexSort() != null && leafSorter != null) {
+      throw new IllegalArgumentException(
+          "[IndexWriter] can't use index sort and leaf sorter at the same 
time!");

Review comment:
       Hmm I do see where you said we want to use `leafSorter` to sort 
documents. I guess I might challenge that design in favor of building on the 
`indexSort` we already have? But perhaps this is better sorted out in the 
context of a later PR, as you suggested.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to