teaminmedias-pluswerk / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
35 stars 62 forks source link

Trouble with naming conflicts when indexing News with Tags #383

Closed h3nn3s closed 3 years ago

h3nn3s commented 3 years ago

Hi,

i recently stumbled upon one very interesting issue. After investigating in this issue I found the Problem itself, but cannot give a solution.

Assumption: You use EXT:news and split it in separate folders: one with news character and one representing "events". Both folders use Tags with titles like "News: foo" and "News: bar" We use two indexers to differentiate between news and events. One adds "news" and one "events" as kesearch Tag to the index. In Frontend we also have filter for "news" and "events" tags.

Now the problem kicks in: There are some "events" listed, when filter "news" is applied. When debugging, some Events use these tags: "events, News: foo, xyz"

It seems, that filtering is done with wildcards. Filtering for news matches index tags "news", but also "News: foo" (which is automatically added to index, because our Event was tagged with the News-Tag "News: foo").

We solved this issue meanwhile with renaming our tags, to use unique wording between index tags and news tags.

christianbltr commented 3 years ago

Thanks for reporting. Indeed, the tags are separated by word boundaries, so "News" will also match "News: foo" or "News-foo" but not "Newsfoo". This is now fixed by adding the "alphanum" evaluation to tags in the backend. So it is not possible to create tags containing spaces, dashes, colons or special characters anymore in the backend. An upgrade wizard is provided which will remove all non-alphanumeric characters from existing tags. This is a breaking change, so please make sure to run the upgrade wizard, re-index and check your custom scripts.