As a user, I would like to use Advanced Search to search for content and exclude specific content type:
In Search application, user selects Advanced Search
User enters search term and deselects a specific content type (e.g. "Files") from the list of applications
Perform search
Result: The list of search results still contains the deselected content type (e.g. files) although this category has been deselected.
As a user, I would like to use Advanced Search to search for a specific community:
In Search application, select advanced search
Enter search term and deselect all (via "Clear all" button) and select only "Communities" from the list of applications
Perform search
Result: The search result still lists all content types of blogs, wikis, bookmarks etc although the specific content types have been deselected. Not only communities as expected by user selection.
Ticket opened with support and stated, it is „working as designed“. As „Community“ is selected, search returns content which is stored inside communities regardless if the specific content type has been deselected.
Now, this behavior is illogical to users. When limiting the search to "Communities", user expect only communities as search result which matches to the search pattern by community metadata (name/title, description, tags). On the other hand, if a user deselects "Files" from the list, she expects that Search is not listing any content of type "Files", regardless if a file is stored in a personal library or in a community. The same applies to the other application types like Blogs, Wikis etc.
Search provides two API features - Scopes API and Constraints:
Scopes API: https://ds_infolib.hcltechsw.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=HCL+Connections+7.0+API+Documentation#action=openDocument&res_title=Scopes_API_70&content=apicontent
Category Constrainsts as part of Search API: https://ds_infolib.hcltechsw.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=HCL+Connections+7.0+API+Documentation#action=openDocument&res_title=Constraints_70&content=apicontent
List of category constrainsts for components: https://ds_infolib.hcltechsw.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=HCL+Connections+7.0+API+Documentation#action=openDocument&res_title=Categories_in_Search_API_responses_70&content=apicontent
Advanced Search widget makes use of both.
If you select only one type in advanced search, the Scope API is used. For example, if you select "Blogs", then the request is
/search/web/search?scope=allconnections&scope=blogs&query=searchterm
This returns blogs content, standalone blogs as well as community blogs.
If you select only "Community", then the request is
/search/web/search?scope=allconnections&scope=communities&query=searchterm
This will return communities and content stored in communities only matching the "searchterm".
Scopes API also allows the other categories. To scope the search to communities only, the request would be
/search/web/search?scope=allconnections&scope=communities%3Aentry&query=searchterm
The Scopes API only works if you specify/select a single content type only in advanced search.
If multiple content types are selected, the Category constraint of the Search API is used.
For example, if you select Communities and Wikis in advanced search, it results in the request
/search/web/search?scope=allconnections&constraint=%7B"type"%3A"category"%2C"values"%3A%5B"Source%2Fcommunities"%2C"Source%2Fwikis"%5D%7D&query=searchterm
The decoded category constraint is
constraint={"type":"category","values":["Source/communities","Source/wikis"]}
This will return results from wikis (standalone/community) but also all content (blogs, forum, files, ....) stored inside communities.
Now, if you do not want all content of communities considered but only communities itself, the request has to look like:
/search/web/search?scope=allconnections&constraint=%7B"type"%3A"category"%2C"values"%3A%5B"Source%2Fcommunities%2Fentry"%2C"Source%2Fwikis"%5D%7D&query=searchterm
The decoded category constraint is
constraint={"type":"category","values":["Source/communities/entry","Source/wikis"]}
This will really only return wikis (standalone and communities) as well as communities (but not its content) matching the "searchterm".
Writing down all this to demonstrate, that a design which matches user expectation would be possible. Unfortunately, the Advanced Search widget has been developed the wrong way some time ago and now users should adapt it.
As most of the content is created inside communities, not in standalone applications, users would always have to deselect the application type AND "Communities" to filter the specific application.