cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with LUCENE search

fstnboy
Champ on-the-rise
Champ on-the-rise
Hi…  :roll:

I´ve got some problems with the LUCENE search….

I want to search below the current node for spaces with a specific aspect, so I do the next search:

"+ASPECT:\"{http://www.libertyseguros.es/model/content/ajd/1.0}EsEmpresa\" 
+PATH:\"" + serviceRegistry.getNodeService().getPath(navigationBean.getCurrentNode().getNodeRef()).toPrefixString(serviceRegistry.getNamespaceService()) + "//*\""

I know there should be 1 item as a result of the search but it doesn´t return anything, so I did separated searches. First i searched just by ASPECT, it was ok, the node was returned, then I made a search only by PATH, the node wasn´t returned…  :?

In the spanish forum, told me to print the ISO-9075 codification (he told me that the node explorer uses this codification) of the node to be searched, so i did it and compared it with de default codification. This is what i got:


2008-09-17 17:07:02,214 INFO  [org.alfresco.web.bean.ResumenEjecutivoBean] /{http://www.alfresco.org/model/application/1.0}company_home/{http://www.libertyseguros.es/model/conte...

2008-09-17 17:07:02,245 INFO  [org.alfresco.web.bean.ResumenEjecutivoBean] /{http://www.alfresco.org/model/application/1.0}company_home/{http://www.libertyseguros.es/model/conte... Jurídica/{http://www.libertyseguros.es/model/content/ajd/1.0}Procedimientos/{http://www.libertyseguros.es/mode... de datos/{http://www.alfresco.org/model/content/1.0}Prueba PD

The first one is the default codification path, while the second one is the ISO-9075 codification. As you can see, in the first print the spaces are represented as '_x0020_'.

I´ve seen the database's charset and it is set to 'AL32UTF8' the ordinary and the national to 'AL16UTF16'.

¿What can I do?
3 REPLIES 3

fstnboy
Champ on-the-rise
Champ on-the-rise
I have found that the problem is in the PATH query, exactly with the spaces…

If i perform a search like:
PATH:"/app:company_home/ajd:Asesoría Jurídica/ajd:Procedimientos/ajd:Administrativos/ajd:Protección de datos"

nothing is returned as result of the query. But if the search is:
]PATH:"/app:company_home/ajd:Asesoría_x0020_Jurídica/ajd:Procedimientos/ajd:Administrativos/ajd:Protección_x0020_de_x0020_datos"

a node is returned. The problem is that when I try to access this node this error appears:

javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/admin/node-browser.jsp][Class: javax.faces.component.html.HtmlForm,Id: searchForm][Class: javax.faces.component.html.HtmlCommandLink,Id: selectPrimaryPath][Class: javax.faces.component.html.HtmlOutputText,Id: primaryPath]}
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AdminAuthenticationFilter.doFilter(AdminAuthenticationFilter.java:80)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/admin/node-browser.jsp][Class: javax.faces.component.html.HtmlForm,Id: searchForm][Class: javax.faces.component.html.HtmlCommandLink,Id: selectPrimaryPath][Class: javax.faces.component.html.HtmlOutputText,Id: primaryPath]}
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
… 29 more

I have browse the node I want through the node explorer and there is a node like:
/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.libertyseguros.es/model/conte... Jurídica/{http://www.libertyseguros.es/model/content/ajd/1.0}Procedimientos/{http://www.libertyseguros.es/mode... de datos

Parsing it with the toPrefixString function… it should be:
/app:company_home/ajd:Asesoría Jurídica/ajd:Procedimientos/ajd:Administrativos/ajd:Protección de datos

But as I have told you, the search with spaces doesn´t work… I think it is charset question or something like this. What must i do?

Thanks in advance

fstnboy
Champ on-the-rise
Champ on-the-rise
I have found something….

Browsing with the node browser manually i get this node reference: 84a8677d-aa40-11dc-a0d9-e5e5abf27240
But when i do it with the LUCENE search the reference is this one: 422520a2-0c71-11dd-802d-ed1cae2bd998

Then i have gone to the database and search for this references, the first one exists but the second one, LUCENE´s result, does not exist. So why does LUCENE give me back an unexisting reference? Why doesn´t it took the first one?

fstnboy
Champ on-the-rise
Champ on-the-rise
Problems solved, it was lucene indexes issue. I deploy alfresco with inde.recovery.mode set to FULL and the problem was solved.