AnsweredAssumed Answered

adding custom types in faceted search

Question asked by sharifu on Sep 2, 2015
I am testing on alfresco 5.0.b community. I am trying to add my custom types using the Search Manager. I have tried adding the filter type cm:type but nothing shows up. in my model i have the following which I would like to filter on, in the search




<types>
      <type name="sp:contract">
         <title>Spectrum Contract Document</title>
         <parent>cm:content</parent>
      </type>
      <type name="sp:seismicfolder">
         <title>Seismic Imaging Folder</title>
         <parent>cm:folder</parent>
      </type>
      <type name="sp:finance">
         <title>Spectrum Finance Document</title>
         <parent>sp:contract</parent>
      </type>
      <type name="sp:multiclient">
         <title>MultiClient Document</title>
         <parent>sp:contract</parent>
      </type>
      <type name="sp:mlasupplement">
         <title>MLA or Supplement Document</title>
         <parent>sp:multiclient</parent>
      </type>
      <type name="sp:annualreturn">
         <title>Spectrum Annual Return Document</title>
         <parent>sp:finance</parent>
      </type>
      <type name="sp:bonds">
         <title>Spectrum Bonds and Garantees Document</title>
         <parent>sp:finance</parent>
      </type>
      <type name="sp:invoice">
         <title>Spectrum Invoice</title>
         <parent>sp:finance</parent>
      </type>
      <type name="sp:seismicimaging">
         <title>Seismic Imaging Document</title>
         <parent>sp:contract</parent>
      </type>
   </types>



Also how can i add cmis:path as a filter when i do try it does not work. Error below


2015-09-02 11:07:38,668  ERROR [solr.core.SolrCore] [http-bio-8443-exec-6] org.apache.solr.common.SolrException: undefined field: "@{http://www.alfresco.org/model/cmis/1.0/cs01}path"
   at org.apache.solr.schema.IndexSchema.getField(IndexSchema.java:1198)
   at org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:358)
   at org.apache.solr.request.SimpleFacets$2.call(SimpleFacets.java:556)
   at org.apache.solr.request.SimpleFacets$2.call(SimpleFacets.java:548)
   at java.util.concurrent.FutureTask.run(Unknown Source)
   at org.apache.solr.request.SimpleFacets$1.execute(SimpleFacets.java:502)
   at org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:572)
   at org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:260)
   at org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:84)
   at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:260)
   at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
   at org.apache.solr.core.SolrCore.execute(SolrCore.java:1962)
   at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
   at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
   at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Outcomes