cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Select Faceting

leblexx
Champ in-the-making
Champ in-the-making
Hello everyone!
I want to use "Multi-Select Faceting" using Alfresco Community 5.1 and Solr4.
Actually I want to achieve something like this:

=== Document Type ===
  [ ] Word (42)
  [x] PDF  (96)
  [ ] Excel(11)
  [ ] HTML (63)

in facets, on faceted search results page.

Also thinking to implement OR logic in faceted search.

Regarding to this https://wiki.apache.org/solr/SimpleFacetParameters#Multi-Select_Faceting_and_LocalParams, it can be implemented.

M.b some one already have such experience? Any help would be appreciated.

Thanks.
1 ACCEPTED ANSWER

andy1
Star Collaborator
Star Collaborator

Hi

Share does not support multi-select faceting.

It is part of the search public API in 5.2 and on.

Here is a quick example

{
    "query": {
      "query": "name:*"
  },
  "includeRequest": true,
  "facetFormat": "V2",
  "facetQueries": [
     {"query": "content.size:[0 TO 102400]", "label": "small", "group": "size"},
     {"query": "content.size:[102400 TO 1048576]", "label": "medium", "group": "size"},
     {"query": "content.size:[1048576 TO 16777216]", "label": "large", "group": "size"}
  ],
  "filterQueries": [{"queries": ["content.mimetype:\"text/plain\"", "content.mimetype:\"image/png\""], "tags": ["exclude"]}],
  "facetFields": {"facets": [{"field": "content.mimetype", "excludeFilters":["exclude"]}]}
}

Andy

View answer in original post

1 REPLY 1

andy1
Star Collaborator
Star Collaborator

Hi

Share does not support multi-select faceting.

It is part of the search public API in 5.2 and on.

Here is a quick example

{
    "query": {
      "query": "name:*"
  },
  "includeRequest": true,
  "facetFormat": "V2",
  "facetQueries": [
     {"query": "content.size:[0 TO 102400]", "label": "small", "group": "size"},
     {"query": "content.size:[102400 TO 1048576]", "label": "medium", "group": "size"},
     {"query": "content.size:[1048576 TO 16777216]", "label": "large", "group": "size"}
  ],
  "filterQueries": [{"queries": ["content.mimetype:\"text/plain\"", "content.mimetype:\"image/png\""], "tags": ["exclude"]}],
  "facetFields": {"facets": [{"field": "content.mimetype", "excludeFilters":["exclude"]}]}
}

Andy