Skip to content

remove LanguageAnalyzer #3859

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

Merged
merged 2 commits into from
Mar 6, 2025
Merged

Conversation

fbaligand
Copy link
Contributor

The "language" analyzer does not exist at least since Elasticsearch 8.

If I try to create this index:

PUT my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "default": {
          "type": "language",
          "language": "french",
          "stem_exclusion": ["some_token"]
        }
      }
    }
  }
}

I got this error:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Unknown analyzer type [language] for [default]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Unknown analyzer type [language] for [default]"
  },
  "status": 400
}

That's why this PR aims to remove LanguageAnalyzer class in elasticsearch-specification.

@l-trotta
Copy link
Contributor

l-trotta commented Mar 6, 2025

@fbaligand thank you for the contribution! could you also remove the Language enum since it's not used anywhere else? then I'll run validation in another branch before merging.

@l-trotta l-trotta self-assigned this Mar 6, 2025
@fbaligand fbaligand force-pushed the fix/removeLanguageAnalyzer branch from e237e43 to 36c3a55 Compare March 6, 2025 13:15
@fbaligand
Copy link
Contributor Author

Hi @l-trotta

Thanks for your review!
Indeed, so I just removed "Language" enum and pushed it as a new commit.

@l-trotta l-trotta mentioned this pull request Mar 6, 2025
Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@l-trotta l-trotta merged commit d190348 into elastic:main Mar 6, 2025
7 of 8 checks passed
Copy link
Contributor

github-actions bot commented Mar 6, 2025

The backport to 8.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.x 8.x
# Navigate to the new working tree
cd .worktrees/backport-8.x
# Create a new branch
git switch --create backport-3859-to-8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d190348790683844d972d2a3d239cdb316084f3a
# Push it to GitHub
git push --set-upstream origin backport-3859-to-8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.x

Then, create a pull request where the base branch is 8.x and the compare/head branch is backport-3859-to-8.x.

Copy link
Contributor

github-actions bot commented Mar 6, 2025

The backport to 8.18 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.18 8.18
# Navigate to the new working tree
cd .worktrees/backport-8.18
# Create a new branch
git switch --create backport-3859-to-8.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d190348790683844d972d2a3d239cdb316084f3a
# Push it to GitHub
git push --set-upstream origin backport-3859-to-8.18
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.18

Then, create a pull request where the base branch is 8.18 and the compare/head branch is backport-3859-to-8.18.

github-actions bot pushed a commit that referenced this pull request Mar 6, 2025
* remove LanguageAnalyzer

* remove Language enum

(cherry picked from commit d190348)
l-trotta pushed a commit that referenced this pull request Mar 6, 2025
* remove LanguageAnalyzer

* remove Language enum

(cherry picked from commit d190348)

Co-authored-by: Fabien Baligand <[email protected]>
l-trotta added a commit that referenced this pull request Mar 6, 2025
* remove LanguageAnalyzer

* remove Language enum
l-trotta added a commit that referenced this pull request Mar 6, 2025
* remove LanguageAnalyzer

* remove Language enum
@fbaligand fbaligand deleted the fix/removeLanguageAnalyzer branch March 6, 2025 18:20
@fbaligand
Copy link
Contributor Author

Thanks for the merge @l-trotta !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants