Smart Search content change test plan
From Joomla! Documentation
This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.
This article was last edited by Chris Davenport (talk| contribs) 14 years ago. (Purge)
The following is a rough test plan covering (mainly) updating of the Smart Search index when various kinds of content updates occur.
Smart Search needs to be tested for each of the supported core content types. These are:
- Articles
- Categories
- Contacts
- News feeds
- Web links
For each of the above content types, we need to test the following:
Text changes
Changing the text should change the search terms in the index (with one notable exception described below). To test, simply add some random string, such as "xyz", within a bunch of regular text and towards the top, then try searching for that term on the front-end.
- your random string should appear in the autocompleter list as you type it.
- your random string should appear 3 times in the autocompleter list.
- on its own
- together with the next word following it
- together with the next 2 words following it
- the content item containing your random string should appear in the list of search results.
- your random string should be highlighted in the search results, provided you entered it near the top of the text (because the text in the search results is truncated).
Remove your random string from the text: This *will not* remove the 3 search terms/phrases from the index. Although it would be nice if these strings were removed from the index, this is expected behaviour at this time. Running the indexer (without a prior purge) will remove these excess terms from the index. Searching for any of the 3 search terms should produce no search results.
Delete the content item At the present time this not remove the unused search terms/phrases from the index. Although it would be nice if excess terms were removed from the index, this is expected behaviour at this time. Running the indexer (without a prior purge) will remove the excess terms from the index. [1]
The deleted content item should not appear in any search results list.
Publish/unpublish
For each of the following cases, check that:
- unpublishing results in the item no longer appearing in search results.
- publishing again results in the item appearing in search results again.
Check the above with the following being published/unpublished:
- the content item itself.
- one of the categories to which the content item belongs.
- the content item as listed in the Manage Indexed Content screen.
Category changes
Change the category to which a content item belongs to another category at the same level. Check that:
- the content item appears in a search using the category drop-down (in advanced search) for the new category even if the category did not exist the last time the indexer was run. [2]
- the content item does not appear in a search using the old category.
Change the category to a different category higher up the category tree and repeat.
Delete the content item and check that it no longer appears in search results when that category is selected in a drop-down filter. Note that it is not expected that an unused category will be removed from the category filter. [3]
Other content map (taxonomy) changes
Although changes to the category are a special case of content map changes, we also need to test changes to non-category content map branches because category changes exercise some different code. So, pick something like "author", "region" or whatever is appropriate to the content type and check that:
- changing the author/region/etc., results in the item appearing in a search using the relevant drop-down (in advanced search) for the new author/region/etc. even if the author/region/etc did not exist the last time the indexer was run. [See note 2].
- the content item does not appear in a search using the old author/region/etc.
Delete the content item and check that it no longer appears in search results using the author/region/etc., drop-down filter. Note that it is not expected that an unused node will be removed from the relevant filter. [See note 3].
Access level changes
Change the access level of a content item to something that a front-end user should not be able to see.
- check that the content item does not appear in search results lists.
Change the access level back to something that a front-end user should be able to see.
- check that the content item now appears in search results lists.
Note that search terms within the content item will still appear in the autocompleter list even if the user does not have access to the content item itself. This is expected behaviour, although it is something we might want to look into. [4]
Notes
- ↑ This behaviour of not removing search terms from the index is the same as the old JXtended Finder for Joomla 1.5. Not sure if this should be considered a bug. Fixing it could be a bit tricky.
- ↑ The current Smart Search code and the old JXtended Finder for Joomla 1.5 both fail to create a new taxonomy (content map) node on-the-fly. This could be considered a bug, however there may be use cases where adding an extra node on-the-fly is not desirable (eg. it might mess up a front-end layout), so perhaps a parameter is needed to define the behaviour. Something for a future release.
- ↑ Not removing unused taxonomy nodes on-the-fly might be considered a bug, but I would argue that we probably need a parameter to define that behaviour. I can think of use cases where empty nodes should be retained in the search filters. Something for a future release, I think. If nodes are to be deleted then any static filters that contain the deleted node should also be updated.
- ↑ I think it would be quite difficult to implement an autocompleter that does not list search terms for content items that the user does not have access to. Consequently there is potential for information "leakage" to occur if a site has restricted information and the autocompleter is enabled. Something to consider for the future, but for now it just needs to be documented.