[迁移到Alfresco CE 6.1(201901 GA)和Alfresco Search Services之后,我们有了大量的search performance problems。因此,我尝试按照Creating Solr shards manually在solr中配置分片。我能够创建分片和索引接缝,但当我在alfresco-global.properties
solr6.store.mappings.value.solrMappingAlfresco.nodeString=solr.mycompany.com:8983/solr/#/alfresco
solr6.store.mappings.value.solrMappingAlfresco.numShards=4
solr6.store.mappings.value.solrMappingAlfresco.replicationFactor=1
solr6.store.mappings.value.solrMappingArchive.nodeString=solr.mycompany.com:8983/solr/#/archive
solr6.store.mappings.value.solrMappingArchive.numShards=4
solr6.store.mappings.value.solrMappingArchive.replicationFactor=1
我收到“请求失败405”
/solr/#/alfresco-2/alfresco?wt=json&fl=DBID%2Cscore&rows=50&shards=solr.mycompany.com:8983%2Fsolr%2F%23%2Falfresco-0,solr.mycompany.com:8983%2Fsolr%2F%23%2Falfresco-1,solr.mycompany.com:8983%2Fsolr%2F%23%2Falfresco-2,solr.mycompany.com:8983%2Fsolr%2F%23%2Falfresco-3&df=TEXT&start=0&locale=*&alternativeDic=DEFAULT_DICTIONARY&sort=%40cm%3Amodified+desc&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
at org.alfresco.repo.search.impl.solr.AbstractSolrQueryHTTPClient.postQuery(AbstractSolrQueryHTTPClient.java:79)
at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.postSolrQuery(SolrQueryHTTPClient.java:1116)
at es.keensoft.repo.search.impl.solr.EnhancedSolrQueryHTTPClient.postSolrQuery(EnhancedSolrQueryHTTPClient.java:43)
at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:583)
at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:52)
at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:354)
at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:84)
at jdk.internal.reflect.GeneratedMethodAccessor789.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:79)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy36.query(Unknown Source)
at org.alfresco.repo.search.impl.SearchServiceSubSystemDelegator.query(SearchServiceSubSystemDelegator.java:133)
at jdk.internal.reflect.GeneratedMethodAccessor789.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy36.query(Unknown Source)
at org.alfresco.repo.jscript.Search.queryResultMeta(Search.java:1016)
... 100 more
为了提高可读性,将解码的POST URL转换为solr:
/solr/#/alfresco-2/alfresco?wt=json&fl=DBID,score&rows=50&shards=solr.mycompany.com:8983/solr/#/alfresco-0,solr.mycompany.com:8983/solr/#/alfresco-1,solr.mycompany.com:8983/solr/#/alfresco-2,solr.mycompany.com:8983/solr/#/alfresco-3&df=TEXT&start=0&locale=*&alternativeDic=DEFAULT_DICTIONARY&sort=@cm:modified+desc&fq={!afts}AUTHORITY_FILTER_FROM_JSON&fq={!afts}TENANT_FILTER_FROM_JSON
有人在Alfresco Search Services(1.3.x,1.4)和Alfresco 6.1社区中成功配置了分片吗?有人暗示出了什么问题吗? Alfresco似乎不使用solr标准url来搜索分片索引,所以我不知何故失去了如何使它工作的方法。
回答我自己的问题:示例Creating Solr shards manually doc示例应该在url中没有哈希符号,但是如果solr在SSL支持下运行,not是有效的。
solr6.store.mappings.value.solrMappingAlfresco.nodeString=solr.mycompany.com:8983/solr/alfresco
solr6.store.mappings.value.solrMappingAlfresco.numShards=4
solr6.store.mappings.value.solrMappingAlfresco.replicationFactor=1
solr6.store.mappings.value.solrMappingArchive.nodeString=solr.mycompany.com:8983/solr/archive
solr6.store.mappings.value.solrMappingArchive.numShards=4
solr6.store.mappings.value.solrMappingArchive.replicationFactor=1
作为替代,可以使用DynamicShardRegistration,该文档未记录为在社区版本中有效,但是如果您进行了设置,则可以正常使用
useDynamicShardRegistration=true
在alfresco-global.properties中
另请参见https://github.com/Alfresco/SearchServices/issues/232中的讨论