Skip to content

Conversation

@avdv
Copy link
Contributor

@avdv avdv commented Sep 12, 2017

Fixes #26519

The order was reversed, as the expected value was given for the actual value and
vice versa. This led to a confusing assertion error message:

```
FAILURE 0.04s J1 | KuromojiAnalysisTests.testPartOfSpeechFilter <<< FAILURES!
   > Throwable elastic#1: java.lang.AssertionError: expected different term at index 1
   > Expected: "が"
   >      but: was "おいしい"
```

when the string "が" was actually not expected.
* add new test which checks that part-of-speech tokens are removed when
  using the kuromoji_part_of_speech filter

* initialize the default stop-tags in `KuromojiPartOfSpeechFilterFactory` if
  the `stoptags` are not given in the config
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cbuescher
Copy link
Member

@elasticmachine test this please

@cbuescher
Copy link
Member

@johtani looks like you might be the right person to look at this. Please un-assign yourself if not.

Copy link
Contributor

@johtani johtani left a comment

Choose a reason for hiding this comment

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

LGTM
@cbuescher This PR is bug fix so we can cherry-pick it to 6.x, right?

@cbuescher
Copy link
Member

@johtani if it is a bug fix an doesn't change existing behaviour I'd even pick it to 6.0. Looks low risk to me, do you agree?

@johtani
Copy link
Contributor

johtani commented Sep 15, 2017

@cbuescher I agree with you.

@cbuescher
Copy link
Member

@avdv thanks a lot for this fix, I will merge this to master and the current 6.x branches

@cbuescher cbuescher merged commit 7184cf8 into elastic:master Sep 15, 2017
cbuescher pushed a commit that referenced this pull request Sep 15, 2017
Initialize the default stop-tags in `KuromojiPartOfSpeechFilterFactory` if the
`stoptags` are not given in the config. Also adding a test which checks that 
part-of-speech tokens are removed when using the kuromoji_part_of_speech 
filter.
cbuescher pushed a commit that referenced this pull request Sep 15, 2017
Initialize the default stop-tags in `KuromojiPartOfSpeechFilterFactory` if the
`stoptags` are not given in the config. Also adding a test which checks that 
part-of-speech tokens are removed when using the kuromoji_part_of_speech 
filter.
@avdv
Copy link
Contributor Author

avdv commented Sep 15, 2017

thank for @cbuescher and @johtani! any chance to get this into 5.6.x, too?

@cbuescher
Copy link
Member

@avdv you are right, since this is a bugfix, I think we should also merge to the 5.6 branch. Will do so. Not sure though in which of the next minor releases it is going to end up.

cbuescher pushed a commit that referenced this pull request Sep 15, 2017
Initialize the default stop-tags in `KuromojiPartOfSpeechFilterFactory` if the
`stoptags` are not given in the config. Also adding a test which checks that 
part-of-speech tokens are removed when using the kuromoji_part_of_speech 
filter.
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Sep 16, 2017
* master:
  fix testSniffNodes to use the new error message
  Add check for invalid index in WildcardExpressionResolver (elastic#26409)
  Docs: Use single-node discovery.type for dev example
  Filter unsupported relation for range query builder (elastic#26620)
  Fix kuromoji default stoptags (elastic#26600)
  [Docs] Add description for missing fields in Reindex/Update/Delete By Query (elastic#26618)
  [Docs] Update ingest.asciidoc (elastic#26599)
  Better message text for ResponseException
  [DOCS] Remove edit link from ML node
  enable bwc testing
  fix StartRecoveryRequestTests.testSerialization
  Add bad_request to the rest-api-spec catch params (elastic#26539)
  Introduce a History UUID as a requirement for ops based recovery  (elastic#26577)
  Add missing catch arguments to the rest api spec (elastic#26536)
@colings86 colings86 added >bug v6.0.0-rc1 and removed :Search Relevance/Analysis How text is split into tokens v6.0.0 labels Sep 21, 2017
@lcawl lcawl removed the v6.1.0 label Dec 12, 2017
@lcawl lcawl added :Search Relevance/Analysis How text is split into tokens and removed :Plugin Analysis Kuromoji labels Feb 13, 2018
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.

6 participants