Skip to content

Conversation

getsolaris
Copy link
Contributor

@getsolaris getsolaris commented Apr 8, 2025

Changes

  • Added new create_index tool to create Elasticsearch indices with mappings and settings
  • Implemented support for custom analyzer configuration
  • Updated README.md with documentation for the new tool
  • Added example queries for index creation in the documentation

Would appreciate any help and suggestions for implementing these improvements !

Using 1

image

Using 2

image

Using 3

image
{
  `index`: `user999`,
  `mappings`: {
    `properties`: {
      `id`: {
        `type`: `integer`
      },
      `job`: {
        `type`: `keyword`
      },
      `name`: {
        `type`: `text`,
        `fields`: {
          `keyword`: {
            `type`: `keyword`
          }
        }
      },
      `email`: {
        `type`: `keyword`
      },
      `phone`: {
        `type`: `keyword`
      },
      `github_id`: {
        `type`: `keyword`
      },
      `created_at`: {
        `type`: `date`
      }
    }
  },
  `settings`: {
    `number_of_shards`: 6,
    `number_of_replicas`: 0
  }
}

Index user999 created successfully with the following configuration:
{
  "acknowledged": true,
  "shards_acknowledged": true,
  "index": "user999"
}
image

Using 4

image
{
  `index`: `user9999_kr`,
  `mappings`: {
    `properties`: {
      `id`: {
        `type`: `integer`
      },
      `job`: {
        `type`: `keyword`
      },
      `name`: {
        `type`: `text`,
        `fields`: {
          `keyword`: {
            `type`: `keyword`
          }
        }
      },
      `email`: {
        `type`: `keyword`
      },
      `phone`: {
        `type`: `keyword`
      },
      `github_id`: {
        `type`: `keyword`
      },
      `created_at`: {
        `type`: `date`
      }
    }
  },
  `settings`: {
    `analysis`: {
      `analyzer`: {
        `korean_analyzer`: {
          `type`: `standard`,
          `stopwords`: `_korean_`,
          `tokenizer`: `standard`
        }
      }
    },
    `number_of_shards`: 6,
    `number_of_replicas`: 0
  }
}
image

@getsolaris getsolaris requested a review from a team as a code owner April 8, 2025 13:39
@getsolaris getsolaris changed the title feat: create_index tool for index creation feat: add create_index tool for index creation Apr 8, 2025
@jedrazb
Copy link
Member

jedrazb commented Apr 10, 2025

buildkite test this

@JoshMock JoshMock added the tool:read-write Requests to add tools that can modify Elasticsearch data label Jun 12, 2025
@JoshMock
Copy link
Member

Closing. New implementation is in Rust and the JS package has been deprecated.

@JoshMock JoshMock closed this Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool:read-write Requests to add tools that can modify Elasticsearch data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants