Override the faceted_search_default to modify the default search form ?

Hi, I would like to override the faceted_search_default to delete 2 fields (dc:coverage and dc:subjects). I try to do that in Studio via a xml extension point but it don't work at all.

<extension target="org.nuxeo.ecm.platform.ui.web.ContentViewService" point="contentViews">
    <contentView name="faceted_search_default">
    <title>label.faceted.search.default</title>
    <translateTitle>true</translateTitle>

    <coreQueryPageProvider>
      <property name="coreSession">#{documentManager}</property>
      <whereClause docType="FacetedSearchDefault">
        <fixedPart>
          ecm:mixinType != 'HiddenInNavigation' AND
          ecm:mixinType != 'HiddenInFacetedSearch' AND ecm:isCheckedInVersion = 0
          AND ecm:currentLifeCycleState != 'deleted'
        </fixedPart>
        <predicate parameter="ecm:fulltext" operator="FULLTEXT">
          <field schema="faceted_search_default" name="ecm_fulltext" />
        </predicate>
        <predicate parameter="dc:created" operator="BETWEEN">
          <field schema="faceted_search_default" name="dc_created_min" />
          <field schema="faceted_search_default" name="dc_created_max" />
        </predicate>
        <predicate parameter="dc:modified" operator="BETWEEN">
          <field schema="faceted_search_default" name="dc_modified_min" />
          <field schema="faceted_search_default" name="dc_modified_max" />
        </predicate>
        <predicate parameter="dc:creator" operator="IN">
          <field schema="faceted_search_default" name="dc_creator" />
        </predicate>

        <predicate parameter="ecm:path" operator="STARTSWITH">
          <field schema="faceted_search_default" name="ecm_path" />
        </predicate>
      </whereClause>
      <sort column="dc:title" ascending="true" />
      <pageSize>20</pageSize>
    </coreQueryPageProvider>

    <searchLayout name="faceted_search_default" />

    <useGlobalPageSize>true</useGlobalPageSize>
    <refresh>
      <event>documentChanged</event>
      <event>documentChildrenChanged</event>
    </refresh>
    <cacheKey>only_one_cache</cacheKey>
    <cacheSize>1</cacheSize>

    <resultLayouts>
      <layout name="document_virtual_navigation_listing_ajax"
        title="document_listing" translateTitle="true"
        iconPath="/icons/document_listing_icon.png" />
    </resultLayouts>

    <selectionList>CURRENT_SELECTION</selectionList>
    <actions category="CURRENT_SELECTION_LIST" />

    <flags>
      <flag>FACETED_SEARCH</flag>
    </flags>   </contentView>   </extension>

Thanks for idea

0 votes

1 answers

1025 views

ANSWER



Hi

I find a solution :

  • via Studio : creation of a new faceted search
  • in the nuxeo instance : deactivation of the default faceted search in the local configuration of the domain

By

0 votes