Repository navigation
Consilio: keep a search within the catalog's own index - #47
Merged
Merged
Conversation
catalog.search() spread the caller's request over the catalog's index
({ index, ...req }). The "don't specify the index" check only rejects a truthy
index, so a request carrying index: undefined, null or "" passed the check and
then replaced the catalog's index, and the search ran over every open index on
the OpenSearch cluster.
Spread the request first so the catalog's index always wins. Test searches a
suffixed catalog with an undefined and an empty index, after another catalog
has been filled, and expects exactly its own documents.
unilynx
approved these changes
Oct 12, 2026
Member
this is fixed by #53 |
unilynx
enabled auto-merge
October 12, 2026 08:33
blexrob
approved these changes
Oct 13, 2026
This branch was successfully deployed
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.
catalog.search()built{ index: catalogIndex, ...req }. The "don't specify the index" check only rejects a truthy index, soindex: undefined,nullor""passed the check and then replaced the catalog's index; the OpenSearch client turns that into/_searchover every open index.The request is now spread first so the catalog's index always wins.
Test: the end of
testSuffixesinconsilio.tsapi.test_ts_consiliosearches with an undefined and an empty index and expects exactly the catalog's own three documents; without the fix it also returns the document from the testindex catalog.Unrelated, noticed while reading:
CatalogObj.delete()(catalog.ts~355) fetchesbaseurl + "_doc/" + docidwithout an index name.