Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Solr folder and item search #188

Open
mcangel182 opened this issue Feb 25, 2016 · 0 comments
Open

Solr folder and item search #188

mcangel182 opened this issue Feb 25, 2016 · 0 comments

Comments

@mcangel182
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant