[opencms-dev] Problem with indexing Containerpage with SOLR and Localization

Ramon Gavira Sáenz ramon.gavira at sagasoluciones.com
Thu Mar 13 18:26:32 CET 2014


We found solution, the problem is in Calss CmsSolrDocumentXmlContent.java

https://github.com/rgaviras/opencms-core/commit/d8c51d788fd7d4acf595eec0fe503e81041ac970 


Hope this help someone!!

El 13/03/2014 11:24, Ramon Gavira Sáenz escribió:
> Hello,
>
> We are using the standard configuration of fields an solr, we've found 
> the same problem with version 8.5 and 9.
>
> This is an example of the issue with a fresh installation of version 
> 8.5. using this simple query 
> http://localhost:8080/opencms85/opencms/handleSolrSelect?fq=type:containerpage&rows=1
>
> We don't have problems getting the resources, but the proble handles 
> with the excerpt nodes (actually it happens with content nodes also). 
> the resource has localized content in "en" and "de" In the 
> response-doc we get two nodes:
>
> <str name="en_excerpt">
> <str name="de_excerpt">
>
> the firs one has a piece of text which corresponds with english content
> the problem is that the second one  contains the same piece of text of 
> the english node plus the german one. We need to show the excerpt 
> Localized but we can't because the text are mixed...
>
> This happens also with the content nodes: content_en and content_de
>
> Does anybody has the same problem?, How did you solve it?, Is it a bug 
> o a miisconfiguration issue?
>
> =======================
> http://localhost:8080/opencms85/opencms/handleSolrSelect?fq=type:containerpage&rows=1 
>
> The solr response looks like, you cant try it in any installation:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
>     <lst name="responseHeader">
>         <int name="status">0</int>
>         <int name="QTime">2</int>
>         <lst name="params">
>             <str name="q">*:*</str>
>             <str name="fl">*,score</str>
>             <str name="qt">edismax</str>
>             <int name="rows">1</int>
>             <arr name="fq">
>                 <str>con_locales:en</str>
> <str>parent-folders:/sites/default/</str>
>                 <str>type:containerpage</str>
>             </arr>
>             <long name="start">0</long>
>         </lst>
>     </lst>
>     <result name="response" numFound="49" start="0">
>         <doc>
>             <str name="id">14c92a4a-c996-11e0-b07b-a97c08d979d8</str>
>             <str name="contentblob">[B:[B at e301173</str>
>             <str 
> name="path">/sites/default/flower-de/blumen-abonnements/index.html
>             </str>
>             <str name="type">containerpage</str>
>             <str name="suffix">.html</str>
>             <int name="size">3448</int>
>             <date name="created">2012-08-18T12:32:05Z</date>
>             <date name="lastmodified">2012-09-17T12:52:46Z</date>
>             <date name="contentdate">2014-03-12T17:21:51.619Z</date>
>             <date name="relased">1970-01-01T00:00:00Z</date>
>             <date name="expired">292278994-08-17T07:12:55.807Z</date>
>             <arr name="res_locales">
>                 <str>en</str>
>                 <str>de</str>
>             </arr>
>             <arr name="con_locales">
>                 <str>en</str>
>                 <str>de</str>
>             </arr>
>             <str 
> name="template_prop">/system/modules/com.alkacon.opencms.v8.template3/templates/main.jsp
>             </str>
>             <str 
> name="default-file_prop">##navigation_level_folder##</str>
>             <str name="locale_prop">de</str>
>             <str name="NavPos_prop">41.0</str>
>             <str name="NavText_prop">Blumen Abonnements</str>
>             <str name="Title_prop">Blumen Abonnements</str>
>             <str name="style.columns_prop">2</str>
>             <arr name="content_en">
>                 <str>The OpenCms 8.5 content subscription engine
>                     OpenCms 8.5 allows users to subscribe to content 
> pages or binary
>                     documents. A user can see a list of his 
> subscriptions and receive
>                     notifications in case one of his subscribed pages 
> has been updated
>                     or deleted. It's also possible to "force" 
> subscriptions for a user
>                     or group of users.
> </str>
>             </arr>
>             <arr name="spell">
>                 <str>The OpenCms 8.5 content subscription engine
>                     OpenCms 8.5 allows users to subscribe to content 
> pages or binary
>                     documents. A user can see a list of his 
> subscriptions and receive
>                     notifications in case one of his subscribed pages 
> has been updated
>                     or deleted. It's also possible to "force" 
> subscriptions for a user
>                     or group of users.
> </str>
>             </arr>
>             <str name="en_excerpt">The OpenCms 8.5 content 
> subscription engine
>                 OpenCms 8.5 allows users to subscribe to content pages 
> or binary documents.
>                 A user can see a list of his subscriptions and receive 
> notifications
>                 in case one of his subscribed pages has been updated 
> or deleted.
>                 It's also possible to "force" subscriptions for a user 
> or group of
>                 users.
> </str>
>             <arr name="content_de">
>                 <str>The OpenCms 8.5 content subscription engine
>                     OpenCms 8.5 allows users to subscribe to content 
> pages or binary
>                     documents. A user can see a list of his 
> subscriptions and receive
>                     notifications in case one of his subscribed pages 
> has been updated
>                     or deleted. It's also possible to "force" 
> subscriptions for a user
>                     or group of users.
>                     Die Abonnement-Funktion von OpenCms 8.5
>                     OpenCms 8.5 ermöglicht es Benutzern, Seiten oder 
> Dokumente im System zu
>                     abonnieren. Ein Benutzer kann sich eine Liste 
> seiner Abonnements
>                     anzeigen lassen, mit Hinweisen falls eine seiner 
> abonnierten Seiten
>                     geändert oder gelöscht wurde. Es ist auch möglich 
> das Abonnement
>                     bestimmter Inhalte für einen Benutzer oder eine 
> Gruppe zu
>                     erzwingen.
> </str>
>             </arr>
>             <str name="de_excerpt">The OpenCms 8.5 content 
> subscription engine
>                 OpenCms 8.5 allows users to subscribe to content pages 
> or binary documents.
>                 A user can see a list of his subscriptions and receive 
> notifications
>                 in case one of his subscribed pages has been updated 
> or deleted.
>                 It's also possible to "force" subscriptions for a user 
> or group of
>                 users.
>                 Die Abonnement-Funktion von OpenCms 8.5
>                 OpenCms 8.5 ermöglicht es Benutzern, Seiten oder 
> Dokumente im System zu
>                 abonnieren. Ein Benutzer kann sich eine Liste seiner 
> Abonnements
>                 anzeigen lassen, mit Hinweisen falls eine seiner 
> abonnierten Seiten
>                 geändert oder gelöscht wurde. Es ist auch möglich das 
> Abonnement
>                 bestimmter Inhalte für einen Benutzer oder eine Gruppe 
> zu erzwingen.
>             </str>
>             <date name="timestamp">2014-03-12T18:16:01.291Z</date>
>             <float name="score">1.0</float>
>             <str 
> name="link">/opencms85/opencms/flower-de/blumen-abonnements/index.html
>             </str>
>         </doc>
>     </result>
> </response>
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>

-- 
Ramón Gavira
*/Ramón Gavira Sáenz/*
/Socio Director de Operaciones y Proyectos/

Mov: 687 543 161 | Tel: 954 45 72 75 |fax: 954 45 75 72

Logotipo de Saga Soluciones
QR Code de tarjeta de visita 	

www.sagasoluciones.com <http://www.sagasoluciones.com>

www.templatesaga.com <http://www.templatesaga.com/>

Facebook <http://www.facebook.com/sagasoluciones> Twitter 
<https://twitter.com/SagaSoluciones>

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a 
su destinatario o destinatarios. Queda prohibida su divulgación, copia o 
distribución a terceros sin la previa autorización escrita de SaGa 
Consulting. En el caso de haber recibido este correo electrónico por 
error, se ruega notifóquese inmediatamente esta circunstancia mediante 
reenvóo a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential 
and solely for the attention and use of the named addressee(s). You are 
hereby notified that any dissemination, distribution or copy of this 
communication is prohibited without the prior written consent of SaGa 
Consulting. If you have received this communication in error, please, 
notify the sender by reply e-mail.

Medio ambiente *Antes de imprimir este mensaje, asegúrate de que es 
necesario. El medio ambiente está en nuestras manos*

Medio ambiente *Wasting paper is harmful to the enviroment. Please 
consider that before printing this message.*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140313/be1815f0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_saga.png
Type: image/png
Size: 4428 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140313/be1815f0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ramon.png
Type: image/png
Size: 376 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140313/be1815f0/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: facebook.png
Type: image/png
Size: 1099 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140313/be1815f0/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twitter.png
Type: image/png
Size: 1180 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140313/be1815f0/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: environment-icon.png
Type: image/png
Size: 1949 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140313/be1815f0/attachment-0004.png>


More information about the opencms-dev mailing list