3

我在露天搜索时遇到了一些麻烦,它不起作用(对于管理员或用户)

服务器版本最初是 4.0d 社区版。我尝试在我的开发虚拟机上将其升级到 4.2b 社区版(嵌入所有组件的默认安装程序)。

我的证书有一些问题(我无法访问https://example.com:8443/solr)所以我使用该程序升级了 alf_data 中的证书http://wiki.alfresco.com/wiki/Replacing_Default_Certificate并且它有效好

我重建了所有索引 http://deepak-keswani.blogspot.fr/2012/07/how-to-rebuild-solr-indexes-in-alfresco.html (文件夹大小相同,所以我认为数据是已编入索引,如果有人了解我如何使用 solr 文件夹进行自定义搜索,我将不胜感激)

我在 tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties 和 tomcat/webapps/share/WEB-INF/classes/log4j.properties log4j.logger.org.alfresco.repo.search.impl 中激活了日志。 solr.SolrQueryHTTPClient=debug 但日志文件中没有出现任何内容。

我激活了另一个日志:我在 shared/classes/alfresco/extension/ 中添加了一个包含该内容的文件 dev-log4j.properties:

log4j.logger.org.alfresco.web.scripts=debug
log4j.logger.org.alfresco.repo.web.scripts=debug
log4j.logger.org.alfresco.repo.jscript=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug

我有一个日志结果

21:42:39,375 DEBUG [org.alfresco.repo.jscript.Search] Failed to execute search: ((PATH:"/app:company_home/st:sites/*/*//*" AND (testours  AND (+TYPE:"cm:content" +TYPE:"cm:folder"))) AND -TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating") AND NOT ASPECT:"sys:hidden"
org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 11300004 Request failed 500 /solr/alfresco/afts?wt=json&fl=DBID%2Cscore&rows=502&df=keywords&start=0&locale=fr&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
    at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:398)
    at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
    at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
    at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy12.query(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy12.query(Unknown Source)
    at org.alfresco.repo.jscript.Search.query(Search.java:803)
    at org.alfresco.repo.jscript.Search.query(Search.java:686)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
    at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)
    at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
    at org.mozilla.javascript.gen.c3._c20(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:1013)
    at org.mozilla.javascript.gen.c3.call(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
    at org.mozilla.javascript.gen.c3._c22(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:1057)
    at org.mozilla.javascript.gen.c3.call(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
    at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
    at org.mozilla.javascript.gen.c3._c0(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js:1060)
    at org.mozilla.javascript.gen.c3.call(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
    at org.mozilla.javascript.gen.c3.call(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
    at org.mozilla.javascript.gen.c3.exec(file:/home/alfresco-4.0.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:492)
    at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:198)
    at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
    at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
    at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
    at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1305)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
    at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:422)
    at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491)
    at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)
    at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:345)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
    at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:1771)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

当我尝试网址时:

https://example.com:8443/solr/alfresco/afts?wt=json&fl=DBID%2Cscore&rows=502&df=keywords&start=0&locale=fr&fq= {!afts}AUTHORITY_FILTER_FROM_JSON&fq={!afts}TENANT_FILTER_FROM_JSON

我从 tomcat 发出了 500 页:

Etat HTTP 500 - null java.lang.NullPointerException at org.antlr.runtime.ANTLRStringStream.(ANTLRStringStream.java:75) at org.alfresco.repo.search.impl.parsers.FTSQueryParser.buildFTS(FTSQueryParser.java:108) at org.alfresco.solr.AlfrescoSolrDataModel.getFTSQuery(AlfrescoSolrDataModel.java:986) 在 org.alfresco.solr.query.AlfrescoFTSQParserPlugin$AlfrescoFTSQParser.parse(AlfrescoFTSQParserPlugin.java:80) 在 org.apache.solr.search.QParser.getQuery( QParser.java:131) 在 org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89) 在 org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174) 在 org .apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) 在 org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) 在 org.apache.solr.servlet。SolrDispatchFilter.execute(SolrDispatchFilter.java:338) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve .java:123) 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) 在 org.apache.catalina.org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)。 Valves.ErrorReportValve.invoke(ErrorReportValve.java:99) 在 org.apache.catalina.valves.AccessLogValve。在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 在 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 调用(AccessLogValve.java:929) .coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) 在 org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) 在 org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run (JIoEndpoint.java:310) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 在 java.lang.Thread。运行(线程.java:722)CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org .apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603) 在 java.lang.Thread.run(Thread.java:722)CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org .apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:603) 在 java.lang.Thread.run(Thread.java:722)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 在 java.lang.Thread 的 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 运行 (JIoEndpoint.java:310) .run(Thread.java:722)在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 在 java.lang.Thread 的 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 运行 (JIoEndpoint.java:310) .run(Thread.java:722)

然后使用我的新日志参数,我尝试重建它。

我有很多消息http://depositfiles.com/files/4w85yegap但我没有看到任何元素

我试着用 Luke (Lucene Index Toolbox) 打开它,但我不知道如何使用它......但它说我有 40k 个文档,这些文档可能是真的(但我无法检查它们是否被很好地索引)

更新

我用 alfresco 4.0d 重试了它,它可以工作。(我会对新版本有问题,但它解决了我的部分问题)。我的快速升级程序是关闭、备份并将 4.0d 移动到另一个目录,然后复制 alf_data,更正证书。有什么线索吗?

有人有解决方案或提示可以继续吗?

问候

4

3 回答 3

3

一旦 solr 与 alfresco 4.0d 一起工作(证书问题,您可以获取较新版本的证书或生成自己的证书)。我使用该程序将 alfresco 升级到 4.2b:http ://www.fossoffice.com/en/2012/10/31/alfresco-community-upgrade/

于 2013-01-17T16:30:59.507 回答
2

你 100% 确定 solr 索引重建真的成功了吗?

我已经看到由已从字典中删除的类型实例导致的类似搜索错误。

您是否在 4.2 系统上部署了与 4.0 相同的扩展类型?

如果有疑问,请停止系统,擦除索引并再次重建。在重建过程中放松并观察日志中的异常。就我而言,这些错误提示了缺少类型。在这种情况下,要么在重建索引之前删除相应的节点,要么使这些类型在新系统的数据字典中可用。

于 2012-12-30T21:58:10.483 回答
2

我想,您的查询不正确。

((PATH:"/app:company_home/st:sites/*/*//*" AND (testours AND (+TYPE:"cm:content" +TYPE:"cm:folder"))) AND -TYPE:" cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating") AND NOT ASPECT:"sys:hidden"

原因:testours 不是 Lucene Query 中的关键字。并且无需添加“/*/*//*”进行任何级别的搜索。仅添加//*将起作用。路径:“/app:company_home/st:sites//*”

你得到的错误 - Etat HTTP 500 - null java.lang.NullPointerException at org.antlr.runtime.ANTLRStringStream.(ANTLRStringStream.java:75)

当您尝试在浏览器上点击此链接 https://example.com:8443/solr/alfresco/afts?wt=json&fl=DBID%2Cscore&rows=502&df=keywords&start=0&locale=fr&fq= {!afts}AUTHORITY_FILTER_FROM_JSON&fq={!afts} TENANT_FILTER_FROM_JSON

-- 这是因为,您忘记在其中添加“查询”参数 q ="SOME_LUCENE_QUERY"。

试试这个.. https://example.com:8443/solr/alfresco/aftsq=TYPE:"cm:folder" &wt=json&fl=DBID%2Cscore&rows=502&locale=fr&indent=on

于 2012-12-31T04:26:11.407 回答