[opencms-dev] NPE when using group in Solr search query
Daniel Seidel
d.seidel at alkacon.com
Mon Apr 3 09:07:43 CEST 2017
Hi Felix,
currently it is not our focus to alter the Solr integration. Depending
on customer needs it might change.
Best, Daniel.
Am 28.03.2017 um 16:21 schrieb Felix Noz:
> Hi Daniel,
>
> alright, thanks a lot for the quuck and clear Answer. I think I'll
> handle this in another way.
> Just for curiosity: are there any plans to support grouping in future?
>
> Kind regards
> Felix
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
> gesendet.
> Am 28.03.17, 15:34, Daniel Seidel <d.seidel
> <http://d.seidel>@alkacon.com> schrieb:
>
> Hi Felix,
>
> just a comment on the group feature: It currently does not work
> with OpenCms. I just debugged the code. The problem is
> org.opencms.search.solr.CmsSolrIndex#search(CmsObject,
> CmsSolrQuery, boolean, ServletResponse, boolean,
> CmsResourceFilter). Here the "hitCount" is extracted from the
> QueryResponse via queryResponse.getResults().getNumFound() - but
> queryResponse.getResults() yields null for a grouped response.
>
> Best, Daniel.
>
>
> Am 27.03.2017 um 20:46 schrieb f.noz at gmx.de:
>
> Hi Daniel,
> it's OpenCms 10.0.1
> The exception doesn't occur when I use the solr parameter
> group.main=true but then I get only one result instead of a
> flat and grouped list of all results as mentioned in the solr
> doucmentation.
> Maybe my approach is wrong because I'm trying to solve a
> really banal problem. I just want the result first sorted by
> the boolean field ride_recurring (when value==true) and then
> by a date field descending, eg having the following resources
> Ride1: recurring=false, date=01.05.2017
> Ride2: recurring=true, date=01.05.2017
> Ride3: recurring=true, date=01.06.2017
> Ride4: recurring=false, date=01.06.2017
> should give the result in the folloging order:
> Ride3 -> Ride2 -> Ride4 -> Ride1
> using sort=recurring_s asc,date_dt desc results in strange
> order so that's why I try it with group.
> Any suggestions?
> Regards
> Felix
> *Gesendet:* Mittwoch, 22. März 2017 um 14:10 Uhr
> *Von:* "Daniel Seidel" <d.seidel at alkacon.com>
> *An:* opencms-dev at opencms.org
> *Betreff:* Re: [opencms-dev] NPE when using group in Solr
> search query
>
> Hi Felix,
>
> could you please tell me your OpenCms-Version?
>
> Best, Daniel.
>
> Am 22.03.2017 um 12:40 schrieb Felix Noz:
>
> Hi guys,
> there's an XmlContent which contains a field named
> ride_recurring of type OpenCmsBoolean. My goal is that the
> result of the query shows first all items with
> ride_recurring==false and only after that all items with
> ride_recurring==false.
> When omitting the grouping parameters the search works
> fine and all items are displayed non-grouped but as soon
> as adding &group=true&group.field=ride_recurring_s the
> exception below occurs.
> Can anybody help me and tell me what's going wrong there?
> Regards
> Felix
> Caused by: org.opencms.search.CmsSearchException:
> Ausführung des Queries
> "q=*:*&fl=*,score&qt=edismax&rows=5000&fq=expired:[NOW TO
> *]&fq=con_locales:de&fq=parent-folders:"/sites/default/"&fq=type:nb-ms-ride&fq=released:[*
> TO
> NOW]&fq=search_exclude:"false"&group.field=ride_recurring_s&group=true&start=0"
> schlug fehl.
> at
> org.opencms.search.solr.CmsSolrIndex.search(CmsSolrIndex.java:1095)
> at
> org.opencms.search.solr.CmsSolrIndex.search(CmsSolrIndex.java:507)
> at
> org.opencms.file.collectors.CmsSolrCollector.getResults(CmsSolrCollector.java:193)
> at
> org.opencms.file.collectors.CmsSolrCollector.getResults(CmsSolrCollector.java:169)
> at
> org.opencms.jsp.CmsJspTagContentLoad.init(CmsJspTagContentLoad.java:575)
> at
> org.opencms.jsp.CmsJspTagContentLoad.doStartTag(CmsJspTagContentLoad.java:235)
> at
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.XXX_002dlist_jsp._jspService(ride_002dlist_jsp.java:373)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
> at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
> at
> com.XXX.filter.BaseFilter.processFilter(BaseFilter.java:82)
> at
> com.XXX.filter.WelcomeFilter.processFilter(WelcomeFilter.java:86)
> at com.XXX.filter.BaseFilter.doFilter(BaseFilter.java:31)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:726)
> at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:592)
> at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:526)
> at
> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:191)
> at
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:165)
> at
> org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:191)
> at
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:165)
> at
> org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:655)
> at
> org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:441)
> at
> org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:169)
> at
> org.opencms.jsp.CmsJspTagInclude.includeActionWithCache(CmsJspTagInclude.java:379)
> at
> org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:244)
> at
> org.opencms.jsp.CmsJspTagInclude.doEndTag(CmsJspTagInclude.java:490)
> at
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_ade_config.formatters.function_jsp._jspx_meth_cms_005finclude_005f0(function_jsp.java:340)
> at
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_ade_config.formatters.function_jsp._jspx_meth_c_005fwhen_005f0(function_jsp.java:288)
> at
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_ade_config.formatters.function_jsp._jspx_meth_c_005fchoose_005f0(function_jsp.java:249)
> at
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_ade_config.formatters.function_jsp._jspx_meth_cms_005fformatter_005f0(function_jsp.java:191)
> at
> org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_ade_config.formatters.function_jsp._jspService(function_jsp.java:142)
> ... 117 more
> Caused by: java.lang.NullPointerException
> at
> org.opencms.search.solr.CmsSolrIndex.search(CmsSolrIndex.java:866)
> ... 154 more
>
> _______________________________________________
> 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
>
>
>
> --
> Kind Regards,
> Daniel.
>
> -------------------
>
> Daniel Seidel
>
> Alkacon Software GmbH & Co. KG - The OpenCms Experts
> http://www.alkacon.com -http://www.opencms.org
>
> _______________________________________________ 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
>
>
> _______________________________________________
> 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
>
>
>
>
> --
> Daniel Seidel
>
> -------------------
>
> Alkacon Software GmbH & Co. KG - The OpenCms Experts
> Daniel Seidel
> An der Wachsfabrik 13
> 50996 Koeln, DE
>
> Tel: +49 (0)2236 3826-16
> Fax: +49 (0)2236 3826-20
> Email:d.seidel at alkacon.com
>
> http://www.alkacon.com
> http://www.opencms.org
>
> Amtsgericht Köln, HRA 32185, USt-IdNr.: DE259882372
> Vertreten durch: Alkacon Verwaltungs GmbH
> Geschäftsführer: Alexander Kandzior, Amtsgericht Köln, HRB 88218
>
> _______________________________________________ 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
>
>
>
> _______________________________________________
> 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
>
>
>
--
Kind Regards,
Daniel.
-------------------
Daniel Seidel
Alkacon Software GmbH & Co. KG - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170403/90e1fffc/attachment.htm>
More information about the opencms-dev
mailing list