Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Smart Search] Taxonomy node values should not be added as search terms in the index #23736

Merged

Conversation

chrisdavenport
Copy link
Contributor

@chrisdavenport chrisdavenport commented Feb 1, 2019

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.

@Hackwar
Copy link
Member

Hackwar commented Feb 1, 2019

I agree with this. Good catch.

@HLeithner HLeithner added this to the Joomla 3.9.3 milestone Feb 1, 2019
@HLeithner HLeithner merged commit 36e923a into joomla:staging Feb 1, 2019
@HLeithner
Copy link
Member

thx

@chrisdavenport chrisdavenport deleted the smart-search-taxonomy-node-indexing branch February 1, 2019 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants