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

Expose Japanese completion filter to kuromoji analysis plugin #81858

Merged
merged 4 commits into from
Jan 31, 2022

Conversation

mocobeta
Copy link
Contributor

@mocobeta mocobeta commented Dec 17, 2021

This adds analysis factories of JapaneseCompletionFilter and JapaneseCompletionAnalyzer (https://issues.apache.org/jira/browse/LUCENE-10102) to kuromoji plugin.

This is expected to be used in combination with Completion Suggester. For example:

# working example (we are running this setting on 7.x)
"mappings": {
    "properties": {
      "suggest_ja": {
        "type": "completion",
        "analyzer": "kuromoji_completion_index",
        "search_analyzer": "kuromoji_completion_query",
        "preserve_separators": false,
        "preserve_position_increments": true,
        "max_input_length": 50
      },
      "suggest_en": {
        "type": "completion",
        "analyzer": "standard",
        "preserve_separators": false,
        "preserve_position_increments": true,
        "max_input_length": 50
      }
    }
  }

Or, for searching use-cases, this could be used as a replacement of kuromoji_readingform; though we have not used it for searching.

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

@elasticsearchmachine elasticsearchmachine added v8.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Dec 17, 2021
@mocobeta
Copy link
Contributor Author

I'd be happy if I could get your feedback.

@DJRickyB DJRickyB added the :Search Relevance/Analysis How text is split into tokens label Jan 28, 2022
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jan 28, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@romseygeek romseygeek self-assigned this Jan 31, 2022
@romseygeek
Copy link
Contributor

@elasticmachine ok to test

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

Thanks @mocobeta, this looks great! Assuming that CI is happy I am good to merge this.

@romseygeek
Copy link
Contributor

@elasticmachine update branch

@romseygeek romseygeek merged commit 997a600 into elastic:master Jan 31, 2022
@mocobeta
Copy link
Contributor Author

Thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team :Search Relevance/Analysis How text is split into tokens Team:Search Meta label for search team v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants