Skip to content

Conversation

@romseygeek
Copy link
Contributor

The synonym filters no longer need access to the AnalysisRegistry in their
constructors, so we can remove the special-case code and move them to the
common analysis module

The synonym filters no longer need access to the AnalysisRegistry in their
constructors, so we can remove the special-case code and move them to the
common analysis module
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Great to see these token filter being moved to analysis common module!

There are a couple of tests in MultiMatchQueryTests and TextFieldMapperTests (and I guess more when it gets to the integTest phase) that rely on the synonym token filter being available in server module. In the past I have dealing with these tests in the following ways:

  • Verify whether the test is still valid and otherwise remove the test.
  • Some tests are using a specific analysis component but don't really need to, so these tests can be changed to not use the analysis component in question.
  • Use a mock analysis component. I think for this change we can use MockSynonymFilter from the lucene test framework.
  • Move the test to the common-analysis module.

Can you also add a rest test to 40_token_filters.yml file? This is just to verify that everything is wired up correctly and a token filter can actually be used.

@romseygeek
Copy link
Contributor Author

Lots of integration test failures:

BUILD FAILED in 19m 36s
11:57:59   - org.elasticsearch.search.query.SearchQueryIT.testMatchQueryWithSynonyms
11:57:59   - org.elasticsearch.search.query.SearchQueryIT.testCommonTermsQueryStackedTokens
11:57:59   - org.elasticsearch.search.suggest.CompletionSuggestSearchIT.testThatSynonymsWork
11:57:59   - org.elasticsearch.snapshots.SharedClusterSnapshotRestoreIT.testChangeSettingsOnRestore
11:57:59   - org.elasticsearch.search.fetch.subphase.highlight.HighlighterSearchIT.testSynonyms
11:57:59   - org.elasticsearch.search.fetch.subphase.highlight.HighlighterSearchIT.testPhrasePrefix
11:57:59   - org.elasticsearch.index.search.MatchQueryIT.testMultiTermsSynonymsPhrase
11:57:59   - org.elasticsearch.index.search.MatchQueryIT.testCommonTerms
11:57:59   - org.elasticsearch.index.search.MatchQueryIT.testSimpleMultiTermAnd
11:57:59   - org.elasticsearch.index.search.MatchQueryIT.testMinShouldMatch
11:57:59   - org.elasticsearch.index.search.MatchQueryIT.testSimpleMultiTermPhrase
11:57:59   - org.elasticsearch.index.search.MatchQueryIT.testPhrasePrefix
11:57:59   - org.elasticsearch.search.functionscore.QueryRescorerIT.testSmallRescoreWindow
11:57:59   - org.elasticsearch.search.functionscore.QueryRescorerIT.testRescorerMadeScoresWorse
11:57:59   - org.elasticsearch.search.functionscore.QueryRescorerIT.testMoreDocs
11:57:59   - org.elasticsearch.validate.SimpleValidateQueryIT.testExplainMatchPhrasePrefix

@romseygeek
Copy link
Contributor Author

Closed in favour of #34034

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.

4 participants