Alfresco 4.2b搜索不适用于Solr

时间:2012-12-30 21:04:50

标签: solr alfresco

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

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

我在证书上遇到了一些问题(我无法访问https://example.com:8443/solr)因此我使用该程序http://wiki.alfresco.com/wiki/Replacing_Default_Certificate升级了alf_data中的证书并且运行良好

我重建了所有索引 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 =调试 但在日志文件中没有任何内容。

我激活了另一个日志:我在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= AUTHORITY_FILTER_FROM_JSON&安培{AFTS!}; {!AFTS} FQ = TENANT_FILTER_FROM_JSON

我从tomcat发了500页:

  

Etat HTTP 500 - null java.lang.NullPointerException at   org.antlr.runtime.ANTLRStringStream。(ANTLRStringStream.java:75)   在   org.alfresco.repo.search.impl.parsers.FTSQueryParser.buildFTS(FTSQueryParser.java:108)   在   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)at   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)at at   org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)   在   org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)   在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)   在   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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)   在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)   在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)   在   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)   在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)   在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)   在   org.apache.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.run(Thread.java:722)

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

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

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

更新

我在alfresco 4.0d上重试了它的确有效。 (我的新版本会有问题,但它解决了我的一部分问题)。我的升级快速程序是关闭,备份并将4.0d移动到另一个目录,然后复制alf_data,更正证书。任何线索?

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

此致

3 个答案:

答案 0 :(得分:3)

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

答案 1 :(得分:2)

您是否100%确定solr索引重建确实成功了?

我已经看到了类似实例导致的类似搜索错误。

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

如果有疑问,请停止系统,擦除索引并重新重建。在重建期间放下并查看日志以查找异常。在我的情况下,错误给出了关于缺失类型的提示。在这种情况下,请在重建索引之前删除相应的节点,或者在新系统的数据字典中使类型可用。

答案 2 :(得分:2)

我想,你的查询不合适。

((路径:“/ app:company_home / st:sites / * / * // *”AND(testours AND(+ TYPE:“cm:content”+ TYPE:“cm:folder”)))和 - TYPE:“cm:thumbnail”AND -TYPE:“cm:failedThumbnail”AND -TYPE:“cm:rating”)而不是ASPECT:“sys:hidden”

原因:在Lucene Query中,testours不是关键字。 并且无需在任何级别添加“/ * / * // *”进行搜索。 只添加 // * 即可。 路径:“/ app:company_home / st:sites // *”

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

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

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

试试这个.. ?https://example.com:8443/solr/alfresco/afts 问= TYPE: “厘米:文件夹”&安培;重量= JSON&安培; FL = DBID%2Cscore&安培;行数= 502&安培;语言环境= FR&安培;缩进=上