[opencms-dev] OpenCMS AjaxSolr Link Problem

Rüdiger Kurz r.kurz at alkacon.com
Wed Oct 2 14:34:22 CEST 2013


Hi,

there is a configureable class that must implement the method:
org.opencms.search.solr.I_CmsSolrPostSearchProcessor.process(CmsObject, 
CmsResource, SolrInputDocument)

this enables you to change the found document(s) at the very last second.

Having a look at the default implementation:
org.opencms.search.solr.CmsSolrLinkProcessor

you will see that a field named "link" is added to the document. So if 
you like to create links on the client side (AJAX is executed on the 
client, so this causes the problem) just use the "link" field.

By the way you can configure the post search processor within the 
opencms-search.xml by adding an optional parameter to your <index>-node:

<param 
name="search.solr.postProcessor">org.opencms.search.solr.CmsSolrLinkProcessor</param>

HTH
Rüdiger


Am 13.09.2013 15:54, schrieb Peter Schmiedt:
> Hi everybody,
>
> I'm using AjaxSolr library (from the Flower-en demo). I'm having trouble
> generating "nice" links. I only get links like:
> "/.content/foo/foobar_00109.html", which as you can tell, can't be
> displayed.
> Normally when using Solr without AJAX, I used the <cms:link> tag in the
> JSP to generate "nice" links. But since I use AJAX to get these links, I
> can't use <cms:link> tag becouse it's rendered in javascript.
>
> The links in the demo site are working properly so there must be a way
> to do this.
>
> Can someone pinpoint me where(or how) exactly are the links generated? I
> took and modified the demo javascript file to my needs and probably
> that's the reason why it's not working.
>
> Regards
>
> Peter Schmiedt

-- 
Kind Regards,
Rüdiger.

-------------------

Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list