mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 15:05:33 +00:00
The shards preference on a search request enables specifying a list of shards to hit, and then a secondary preference (e.g., "_primary") can be added. Today, the separator between the shards list and the secondary preference is ';'. Unfortunately, this is also a valid separtor for URL query parameters. This means that a preference like "_shards:0;_primary" will be parsed into two URL parameters: "_shards:0" and "_primary". With the recent change to strict URL parsing, the second parameter will be rejected, "_primary" is not a valid URL parameter on a search request. This means that this feature has never worked (unless the ';' is escaped, but no one does that because our docs do not that, and there was no indication from Elasticsearch that this did not work). This commit changes the separator to '|'. Relates #20786