Skip to content

ensure original token is not set to type:SYNONYM in SGF - #4960

Merged
epugh merged 2 commits into
apache:mainfrom
renatoh:preserve_upstreap_token_type_in_SGF
Oct 22, 2026
Merged

epugh merged 2 commits into
apache:mainfrom
renatoh:preserve_upstreap_token_type_in_SGF

Conversation

@renatoh

@renatoh renatoh commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

I have noticed that all the tokens after the SGF always have the type SYNONYM.
This is caused by the ManagedSynonymGraphFilterFactory creating a synonym on itself rather than making use of the flag includeOrig for the case where we have [terma]->[terma, termb, termc]

By making use of the flag the tokens type is now preserved and it is possible to distinguish between the synonyms and the original token further down in the analyzer.

@renatoh renatoh changed the title ensure the upstream token is preserves its type and type is not set t… ensure original token is not set to type:SYNONYM in SGF Sep 29, 2026
@renatoh

renatoh commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@epugh Hi Eric, if you get the chance, would you mind having a look at my changes, thanks!

@epugh epugh self-assigned this Oct 15, 2026
@epugh

epugh commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@renatoh I've assigned it to myself so we don't loose it... I am trying to think about who in the space coudl review it who is active in the project... let me see what I can do.

if i don't find anyone, i'll probably merge as it appears to make sense!

CI's changelog-entry check was failing; this PR's fix was otherwise
clean (verified: applies on current main, TestManagedSynonymGraphFilterFactory
passes 5/5, and the new test genuinely fails without the fix).
@epugh

epugh commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@renatoh okay, I think everything is good, i added the chnagelog for you ;-). Do you want this to go all the way back to Solr 9, or just Solr 10?

@renatoh

renatoh commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@epugh I have not added the changelog since I was not sure if these changes will end up being merged, thanks!

@renatoh

renatoh commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@epugh Please merge it also into 9.x, thanks!

@epugh epugh added this to the 9.x milestone Oct 22, 2026
@epugh

epugh commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Great! I have labeled it 9.x Milestone which means David Smiley's backporting tool will fire up in the next day or so and do the work to backport to there.

@epugh
epugh merged commit 51a78ca into apache:main Oct 22, 2026
4 checks passed
@renatoh

renatoh commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@epugh Fantastic, thanks!

dsmiley pushed a commit that referenced this pull request Oct 26, 2026
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