You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.
When SOLR is activated there's a risk that the search we do from the top bar returns items or folders that don't have the word we are looking for. Both methods, folderSearch and itemSearch in modules/solr/Notification.php, do exactly the same except for a small change in the item query (item includes metadata). Basically what this does is that if a folder or item is found to have the word searched, then this folder's/item's key will be returned in both itemSearch and folderSearch, regardless if it is an item or a folder. Then both the item and folder models will load the item/folder with the id returned by solr. If there happens to be a folder and an item with the same id, then both the folder and the item will be returned by the search even if one of these didn't have the word we were searching for.
My suggestion is to include one more filter in the item and folder searches in order to assure that we just return item or folder keys but not both. Another solution could be to perform just one search in the solr index and then filter the results by the result's type.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When SOLR is activated there's a risk that the search we do from the top bar returns items or folders that don't have the word we are looking for. Both methods, folderSearch and itemSearch in modules/solr/Notification.php, do exactly the same except for a small change in the item query (item includes metadata). Basically what this does is that if a folder or item is found to have the word searched, then this folder's/item's key will be returned in both itemSearch and folderSearch, regardless if it is an item or a folder. Then both the item and folder models will load the item/folder with the id returned by solr. If there happens to be a folder and an item with the same id, then both the folder and the item will be returned by the search even if one of these didn't have the word we were searching for.
My suggestion is to include one more filter in the item and folder searches in order to assure that we just return item or folder keys but not both. Another solution could be to perform just one search in the solr index and then filter the results by the result's type.
The text was updated successfully, but these errors were encountered: