[opencms-dev] CmsSolrResultList Issue

Asif G. Khan agkhan at globalrescue.com
Mon Aug 1 15:28:25 CEST 2016


Thanks Tobias, Yes it solved my problem. Actually whenever page has some error in code, the same error message shows up.
I just used JSP for quicker experiments. I will definitely use formatters for actual pages.



Asif G. Khan
From: Tobias Karrer [mailto:kartobi at gmail.com]
Sent: 27 July 2016 17:16
To: Asif G. Khan <agkhan at globalrescue.com>; opencms-dev at opencms.org
Subject: AW: [opencms-dev] CmsSolrResultList Issue

Hi Asif,

I think changing "solr_online" to "Solr Online" should solve your problem.
Or did you rename the standard index?

BTW:
Why don’t you use the solr collector in jsp? (see http://documentation.opencms.org/opencms-documentation/solr-search-integration/#1.4)

Best,
Tobias

Von: Asif G. Khan<mailto:agkhan at globalrescue.com>
Gesendet: Dienstag, 26. Juli 2016 12:49
An: opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>
Betreff: [opencms-dev] CmsSolrResultList Issue

I have following code in a JSP page. When I run the page in browser, it does not show anything and instead throws an error “Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap<https://vaadin.com/forum#!/thread/2438273>.js”


<%@ page pageEncoding="UTF-8" %>
<%@ page import="org.opencms.main.*" %>
<%@ page import="org.opencms.search.*" %>
<%@ page import="org.opencms.search.solr.*" %>
<%@ page import="org.opencms.jsp.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%
String query="fq=type:Blog-Entry";
CmsSolrResultList results = OpenCms.getSearchManager().getIndexSolr("solr_online").search(getCmsObject(), query);
%>
<h1><%= results.size() %></h1>



Thanks
Asif G. Khan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160801/becc22d6/attachment.htm>


More information about the opencms-dev mailing list