-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-13681: make Lucene's index sorting directly configurable in Solr #313
Draft
cpoerschke
wants to merge
19
commits into
apache:main
Choose a base branch
from
cpoerschke:SOLR-13681
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b37f45c
git apply SOLR-13681.patch
cpoerschke 564a66d
Merge remote-tracking branch 'origin/main' into SOLR-13681
cpoerschke bc39779
make it compile
cpoerschke e8ecd26
code review feedback: logging tweak
cpoerschke 7514d34
add (skeleton) SolrIndexConfigIndexSortTest class
cpoerschke 8171b27
add indexConfig fragments to TestSolrConfigHandler
cpoerschke 33a722e
Revert "add indexConfig fragments to TestSolrConfigHandler"
cpoerschke 2247d79
SolrIndexConfigTest: add testIndexSortSolrIndexConfigCreation as coun…
cpoerschke 1478be7
TestSegmentSorting: solrconfig-sortingmergepolicyfactory.xml/solrconf…
cpoerschke 14b8c49
Revert "add (skeleton) SolrIndexConfigIndexSortTest class"
cpoerschke 7feca02
SolrIndexConfigTest: assert that indexSort is not present if not conf…
cpoerschke 736a75b
address TODO in SolrIndexSearcher.buildAndRunCollectorChain to make T…
cpoerschke 3920768
Merge remote-tracking branch 'origin/main' into SOLR-13681
cpoerschke 97b1206
Merge remote-tracking branch 'origin/main' into SOLR-13681
cpoerschke f0889c0
adjust SolrIndexConfigTest.testIndexSortSolrIndexConfigCreation() aft…
cpoerschke 0fd2c9f
Merge remote-tracking branch 'origin/main' into SOLR-13681
cpoerschke eae8527
./gradlew spotlessApply
cpoerschke 94190d5
Merge remote-tracking branch 'origin/main' into SOLR-13681
cpoerschke eee971c
Merge remote-tracking branch 'origin/main' into SOLR-13681
cpoerschke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
solr/core/src/test-files/solr/collection1/conf/solrconfig-indexSort.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<config> | ||
<luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion> | ||
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/> | ||
<schemaFactory class="ClassicIndexSchemaFactory"/> | ||
|
||
<indexConfig> | ||
<lockType>${solr.tests.lockType:single}</lockType> | ||
<indexSort>timestamp_i_dvo desc</indexSort> | ||
</indexConfig> | ||
|
||
<requestHandler name="/select" class="solr.SearchHandler" /> | ||
|
||
<updateHandler class="solr.DirectUpdateHandler2"> | ||
<updateLog> | ||
<str name="dir">${solr.ulog.dir:}</str> | ||
</updateLog> | ||
|
||
<autoCommit> | ||
<maxTime>${solr.autoCommit.maxTime:-1}</maxTime> | ||
<openSearcher>false</openSearcher> | ||
</autoCommit> | ||
|
||
<autoSoftCommit> | ||
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> | ||
</autoSoftCommit> | ||
</updateHandler> | ||
<initParams path="/select"> | ||
<lst name="defaults"> | ||
<str name="df">text</str> | ||
</lst> | ||
</initParams> | ||
|
||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a new test method for the new config option, which will survive removal of SMP. Instead of creating yet another solrconfig-xyz.xml I think it should be possible to let the test invoke config-api to set the new setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I would also favour not creating yet another solrconfig-xyz.xml file. Have used the config-api in tests before but from my research done so far it seems
indexConfig
is not yet supported by it, or rather 'get' works but 'set' does not?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also interestingly V2 'get' works but V1 does not, for
indexConfig
but not for (say)requestHandler
https://solr.apache.org/guide/8_10/config-api.html#retrieving-the-config lists
indexConfig
as available top-level section.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, perhaps they are R/O because it is not supported to change these after collection creation?
In that case, a new xml file is probably better anyway.
Are you planning to validate that index sorting is working in the test, or simply that the config is set? I think perhaps a new method in the existing IndexConfig test would be enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and perhaps changing some
indexConfig
parameters after collection creation would be fine but not so for others. Also the merge policy (factory) configuration is nested, not sure if config-api would easily support that.Added a new method, modelled on the existing sorting-merge-policy one that will go away with sorting merge policy. There is existing
TestSegmentSorting
coverage w.r.t. index sorting working in a test, so it might make sense to tap into that somehow?