fix: put back the convenience API consumers call - #46
Merged
Merged
Conversation
The fork kept the widest constructor of each of these types and dropped the overloads that delegate to it, along with two `empty()` factories. Every one of them is a public entry point in OpenSearch, and a caller that has no `phaseTook`, no point-in-time id and no search extensions has to pass them all explicitly and know what the right null looks like. Restored, byte-for-byte as upstream writes them: - `SearchHits.empty()` / `empty(boolean)` - `ShardSearchFailure(Exception)` - `InternalSearchResponse.empty()` / `empty(boolean)`, and its 7- and 8-argument constructors - `SearchResponse`'s 8- and 9-argument constructors Each delegates; none adds state or behaviour.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The fork kept the widest constructor of several response types and dropped every
overload that delegates to it, plus two
empty()factories. All of them arepublic entry points in OpenSearch, and consumers call them.
fesshit this the momentmainfirst compiled against the fork. A test thatbuilds a
SearchResponseby hand needs four of them, and without them it has toread like this:
— a caller that has no
phaseTook, no point-in-time id and no search extensionshaving to pass all of them and know what the right null is for each. Keeping only
the widest constructor saves nothing: the overloads are one delegating call each.
Restored
SearchHitsempty(),empty(boolean)ShardSearchFailureShardSearchFailure(Exception)InternalSearchResponseempty(),empty(boolean), the 7- and 8-argument constructorsSearchResponseEach body is upstream's, unchanged. None adds state or behaviour; every one
delegates to a constructor that was already here.
Ordering
This needs to be published before codelibs/fess#3442 can go green.
fessmaindoes not compile without it — that PR is otherwise only an import renameand a dead-override removal.
Verification
mvn clean install -DskipTests— BUILD SUCCESS.mvn test— 636 tests, 0 failures, OpenSearch 3/2/1 and Elasticsearch 8/7 containers included.mvn test— see below.fessmainplus fix: make main compile against the forked OpenSearch package fess#3442 reachesmvn test-compileBUILD SUCCESS; without it, it does not.