Skip to content

Commit

Permalink
Fix IT
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Huo <[email protected]>
  • Loading branch information
penghuo committed Jun 26, 2024
1 parent e2d16eb commit 51faf50
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class FlintOpenSearchClient implements FlintClient {
* excluding '*' because it's reserved for pattern matching.
*/
private final static Set<Character> INVALID_INDEX_NAME_CHARS =
Set.of(' ', ':', '"', '+', '/', '\\', '|', '?', '#', '>', '<');
Set.of(' ', ',', ':', '"', '+', '/', '\\', '|', '?', '#', '>', '<');

private final FlintOptions options;

Expand Down Expand Up @@ -167,7 +167,9 @@ public void deleteIndex(String indexName) {
/**
* Create {@link FlintReader}.
*
* @param indexName index name.
* FIXME: should indexName limit to single index? revisit this when add index partition.
*
* @param indexName index name. index name could be single index name, comma separate index.
* @param query DSL query. DSL query is null means match_all.
* @return {@link FlintReader}.
*/
Expand All @@ -183,7 +185,8 @@ public FlintReader createReader(String indexName, String query) {
queryBuilder = AbstractQueryBuilder.parseInnerQueryBuilder(parser);
}
return new OpenSearchScrollReader(createClient(),
sanitizeIndexName(indexName),
String.join(",",
Arrays.stream(indexName.split(",")).map(this::sanitizeIndexName).toArray(String[]::new)),
new SearchSourceBuilder().query(queryBuilder),
options);
} catch (IOException e) {
Expand Down

0 comments on commit 51faf50

Please sign in to comment.