Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-15457

Can not define site filter via solr-facets-config-custom.properties file

    Details

      Description

      Summary

      To be consistent customer wants to be able to manage the filters via the solr-facets-config-custom.properties file. Versus partially in the 'Search Manger' and partial in the properties file.
      In doing so, it seems either the syntax issue (which for site filter, or types does not seem to be documented) or that the properties file does even handle the sites filter, or 'type' filters but just model properties. This would seem inconsistent with the 'Search Manager'. You should be able to configure the filters with either mechanism equivalently.

      Steps to Replicate

      Replicate syntax and testing v5.0.2.N setting Site type in solr facet filter properties file versus search manager UI.

      ex.

      {
          "facets" : [
                 {
                   "filterID" : "filter_content_size",
                   "facetQName" : "{http://www.alfresco.org/model/content/1.0}content.size",
                   "displayName" : "faceted-search.facet-menu.facet.size",
                   "displayControl" : "alfresco\/search\/FacetFilters",
                   "maxFilters" : 5,
                   "hitThreshold" : 1,
                   "minFilterValueLength" : 4,
                   "sortBy" : "INDEX",
                   "scope" : "ALL",
                   "isEnabled" : true,
                   "isDefault" : true
                 },
                 {
                   "filterID" : "sites",
                   "facetQName" : "SITE",
                   "displayName" : "sites",
                   "displayControl" : "alfresco\/search\/FacetFilters",
                   "maxFilters" : 20,
                   "hitThreshold" : 1,
                   "minFilterValueLength" : 1,
                   "sortBy" : "ALPHABETICALLY",
                   "scope" : "ALL",
                   "isEnabled" : true,
                   "isDefault" : false
                 },
      
      . . .
      
      • delete filter and check with GET that it is gone
      • add the site configuration via tomcat/shared/classes/extension/solr-facets-config-custom.properties

      Note: checked FacetFilters,js (aikau-1.0.25.2.jar /META-INF/js/aikau/1.0.25.2/alfresco/search/FacetFilter.js) noted there was a parameter for QName as well so added that to syntax to make sure that QName was being picked up.

      Note: tried with SITE and fully qualified qname ({http\://www.alfresco.org/model/site/1.0}site)

      ex.

      default.st\:site.facetQName=SITE
      default.st\:site.filterID=Site
      default.st\:site.displayName=Site
      default.st\:site.displayControl=alfresco/search/FacetFilters
      default.st\:site.maxFilters=20
      default.st\:site.hitThreshold=1
      default.st\:site.minFilterValueLength=1
      default.st\:site.sortBy=ALPHABETICALLY
      default.st\:site.scope=ALL
      default.st\:site.isEnabled=true
      

      or

      custom.st\:site.facetQName=SITE
      custom.st\:site.filterID=Site
      custom.st\:site.displayName=Site
      custom.st\:site.displayControl=alfresco/search/FacetFilters
      custom.st\:site.maxFilters=20
      custom.st\:site.hitThreshold=1
      custom.st\:site.minFilterValueLength=1
      custom.st\:site.sortBy=ALPHABETICALLY
      custom.st\:site.scope=ALL
      custom.st\:site.isEnabled=true
      
      
      {
          "facets" : [
               {   . . .
                },
                 {
                   "filterID" : "Site",
                   "facetQName" : "{http://www.alfresco.org/model/site/1.0}site",
                   "displayName" : "Site",
                   "displayControl" : "alfresco\/search\/FacetFilters",
                   "maxFilters" : 20,
                   "hitThreshold" : 1,
                   "minFilterValueLength" : 1,
                   "sortBy" : "ALPHABETICALLY",
                   "scope" : "ALL",
                   "isEnabled" : true,
                   "isDefault" : true
                 }
                ]
      
      }
      
      

      Expected Behaviour

      • filtered search result page has the filter for Site

      Actual Behaviour

      • filter search result page has no site filter

      Additional Information

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                jsoria Jennie Soria
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour
                  2d 1h