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

Solr folder and item search #188

@mcangel182

Description

@mcangel182

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions