[opencms-dev] CmsSolrResultList and highlighting
fhsubscriptions at componio.net
fhsubscriptions at componio.net
Wed Jul 10 23:56:45 CEST 2013
Hi Marc,
the <locale>_excerpt is a dynamic field in the solr index and has been
introduced to save some CPU cycles. So basically it has nothing to do
with dynamic highlighting.
>From the Alkacon OpenCms 8.5.1 admin guide, chapter 11.5.3.1 and following:
Does OpenCms support result highlighting?
Yes, use the OpenCms Solr Select handler at:
localhost:8080/opencms/opencms/handleSolrSelect
Regards,
\Fabian
Am 10.07.13 20:12, schrieb Marc Johnen:
> Hello everyone,
>
> I'm using the following to search my site:
>
> String query =
> "hl=true&hl.q=true&hl.fl=*&hl.simple.pre*=&hl.simple.post=*&hl.snippets=50&fq=text:abc&fq=type:toolbox-detail&fq=parent-folders:(/sites/default/tools_and_services/toolbox/)&rows=10";
>
> CmsJspContentAccessBean cms = (CmsJspContentAccessBean )
> pageContext.getAttribute("content");
> CmsSolrResultList results = OpenCms.getSearchManager().getIndexSolr("Solr
> Offline").search(cms.getCmsObject(), query);
>
> for(int i=0;i<results.size();i++){
> out.print(results.get(i).getField("en_excerpt")+"<br/>"
> );
> }
>
> I do get korrekt results but the excerpt does not have any highlighting as I
> would have expected
> and as the results using "CmsSearch" do. Is this not supported or am I
> making a mistake.
>
> Happy about any hints.
>
>
>
> -----
> Greetings
> Marc Johnen
> http://www.johnen.biz
> --
> View this message in context: http://opencms.996256.n3.nabble.com/CmsSolrResultList-and-highlighting-tp23441.html
> Sent from the OpenCMS mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
>
>
More information about the opencms-dev
mailing list