[Smart Search] Taxonomy node values should not be added as search terms in the index #23736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It isn't necessary to add the values of all taxonomy (content map) node values as search terms in the index.
For example, all Joomla websites with regular content items will have the word "article" in the index and will bring back all articles if the word "article" is used as a search term, including any that don't actually contain the word "article". Similarly for "category". You'll even find all the author names have been indexed, including "super user"!
This is unnecessary for two reasons; firstly because any search term that brings back everything in the search results (like "article" does) is useless as a search term and secondly because these terms are often for internal use and shouldn't be exposed to users. The advanced search mode provides drop-downs so that users can search using the taxonomies (content maps) so it isn't necessary to have the taxonomy node values in the terms index too.
Summary of Changes
Removed code that adds taxonomy node values to the terms index.
Testing Instructions
Make sure Smart Search is set up and you've indexed the content. Now, on the front-end, use Smart Search (not the old search) to search for terms such as "Article", "Category" and "Super User".
[EDIT] After applying this PR you will need to do Clear Index and then Index (or equivalently do
php cli/finder_indexer.php --purge
on the command line) in order to completely rebuild the index.Expected result
Search results should actually contain the terms/phrases that you entered.
Actual result
Depending on what content you have, each of these terms/phrases will return results which don't actually contain these terms/phrases (as well as results that do).
Documentation Changes Required
None.