Made repo clear contents also clear the search indices

An issue cropped up where during the refresh of a content view
we cleared the contents of an existing repo but the old search indices
were still preserved. This caused issues when filters were applied
to the repo but didnot get reflected in the indices. (we needed to unassociate old content)
Implementation for add/remove filter rules via cli

Also issues from PR 1974
Merge pull request #2015 from parthaa/clear-contents

Made repo clear contents also clear the search indices
Merge pull request #1974 from parthaa/filter-rule-cli

Implementation for add/remove filter rules via cli