Skip to content

Conversation

@nomoa
Copy link
Contributor

@nomoa nomoa commented Oct 27, 2025

Description

This filter may be useful with keyword fields if preferring to truncate the data rather than ignoring it (ignore above).
Move and re-purpose the TruncateTokenFilterTests from the server module to analysis-common (the lucene truncate filter has moved to lucene a long time ago).

Related Issues

Resolves #19778

Check List

  • Functionality includes testing.
  • [ ] API changes companion pull request created, if applicable.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@nomoa nomoa requested a review from a team as a code owner October 27, 2025 11:04
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing labels Oct 27, 2025
@github-actions
Copy link
Contributor

❕ Gradle check result for ac51c6c: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.26%. Comparing base (a2e1fa2) to head (f66eb1f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19779      +/-   ##
============================================
- Coverage     73.27%   73.26%   -0.01%     
+ Complexity    71553    71519      -34     
============================================
  Files          5789     5789              
  Lines        327144   327144              
  Branches      47156    47156              
============================================
- Hits         239715   239684      -31     
+ Misses        68235    68206      -29     
- Partials      19194    19254      +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

✅ Gradle check result for 84d46c5: SUCCESS

nomoa added a commit to nomoa/opensearch-documentation-website that referenced this pull request Oct 27, 2025
nomoa added a commit to nomoa/opensearch-documentation-website that referenced this pull request Oct 27, 2025
@gaobinlong
Copy link
Contributor

Hi @nomoa , could you add some yaml test cases for this change?

@nomoa nomoa force-pushed the make-truncate-filter-a-normalizing-token-filter branch from 84d46c5 to 651129e Compare November 12, 2025 14:40
@github-actions
Copy link
Contributor

❌ Gradle check result for 651129e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@nomoa
Copy link
Contributor Author

nomoa commented Nov 12, 2025

Hi @nomoa , could you add some yaml test cases for this change?

@gaobinlong thanks for taking a look at this PR, I added a quick entry in the existing yaml test for the truncate filter.
CI issue seems unrelated to the change, I'll retry later.

This filter may be useful with keyword fields if preferring to truncate
the data rather than ignoring it (ignore above).
Move and re-purpose the TruncateTokenFilterTests from the server module
to analysis-common (the lucene truncate filter has moved to lucene a
long time ago).

Signed-off-by: David Causse <[email protected]>
@nomoa nomoa force-pushed the make-truncate-filter-a-normalizing-token-filter branch from 651129e to 2e6541e Compare November 13, 2025 09:58
@github-actions
Copy link
Contributor

✅ Gradle check result for 2e6541e: SUCCESS

@github-actions
Copy link
Contributor

✅ Gradle check result for f66eb1f: SUCCESS

@andrross andrross merged commit 3804387 into opensearch-project:main Nov 17, 2025
33 checks passed
nomoa added a commit to nomoa/opensearch-documentation-website that referenced this pull request Nov 18, 2025
kolchfa-aws pushed a commit to opensearch-project/documentation-website that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] The truncate token filter should be usable in a normalizer

3 participants