Repository navigation
ensure original token is not set to type:SYNONYM in SGF - #4960
Conversation
…o SYNONYM for original token
|
@epugh Hi Eric, if you get the chance, would you mind having a look at my changes, thanks! |
|
@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).
|
@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? |
|
@epugh I have not added the changelog since I was not sure if these changes will end up being merged, thanks! |
|
@epugh Please merge it also into 9.x, thanks! |
|
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 Fantastic, thanks! |
Co-authored-by: Eric Pugh <[email protected]> (cherry picked from commit 51a78ca)
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.