Skip to content
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

Add config to set allow_no_indices when getting fieldcap #9443

Open
seongpyoHong opened this issue Feb 25, 2025 · 0 comments
Open

Add config to set allow_no_indices when getting fieldcap #9443

seongpyoHong opened this issue Feb 25, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@seongpyoHong
Copy link

Is your feature request related to a problem? Please describe.

Background

Opensearch & Dashboard Version: 2.12.0

I use Cross Cluster Search with Remote Cluster settings.

  • Cluaster
    • CCS Cluster: Cluster for Cross Cluster Search
    • Data1 / Data2 Cluster: Cluster to store indices
  • Index Location
    • index1: Index: exists in Data1
    • index2: index: exists in Data2

Problem

In a situation where you are creating an Index Pattern for a Remote Cluster, the following issue occurs.

  • When using the wildcard expression *:index1*, *:index2*, the Time field is not retrieved correctly.
  • This is because an error occurs when requesting to get the field cap. The reason for the error is that Opensearch Dashboard does hardcoding the allow_no_indices option to false when executing the Opensearch Field Cap API. :
    export async function callFieldCapsApi(
    callCluster: LegacyAPICaller,
    indices: string[] | string,
    fieldCapsOptions: { allowNoIndices: boolean } = { allowNoIndices: false }
    ) {
    try {
    return (await callCluster('fieldCaps', {
    index: indices,
    fields: '*',
    ignoreUnavailable: true,
    ...fieldCapsOptions,
    })) as FieldCapsResponse;
    } catch (error) {
    throw convertOpenSearchError(indices, error);

*Describe the solution you'd like

This needs to be set to config so that the allow_no_indice option can be changed.

Describe alternatives you've considered

Since the default value of allow_no_indices in the Opensearch API is true, we also set it to true in Dashboard.

Additional context

@seongpyoHong seongpyoHong added the enhancement New feature or request label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant