Hi Benjamin, sorry I forgot to mention what version of Jahia.
I confirm that I'm working on JAHIA 5. Our jahia version is jahia5.0.4_r24398.jar But I don't find on our installationa the CompassHighlighter class. And it is not present also in WEB-INF classes. tks for your quick answer Ciao gioele Zanzico Gioele Senior Web Analyst Vitec Group - Imaging & Staging Tel +39 0424 555 507 www.vitecgroup.it <blocked::http://www.manfrotto.com/> P Respect the environment: don't print this e-mail, if not necessary. ________________________________ Da: [email protected] [mailto:[email protected]] Per conto di Benjamin Papez Inviato: giovedì 19 marzo 2009 16.30 A: Here you can discuss and comment current and future developments of Jahia Oggetto: Re: [dev_list] (no subject) Ciao Gioele, please always mention which Jahia version you are using, since Jahia 6 is out and Manfrotto still used Jahia 4, so there are different possibilities. I believe your question is based on Jahia 5, because in Jahia 6 I have already changed the teaser retrieval. In Jahia 5 you may see, that the teaser is created in the JSP, so that the one returned from the searchhit object is just the default (in Jahia 6 the API will already return the highlighted teaser). Now for Jahia 5 you have to add this in your Search class : ... String description = thisHit.getTeaser(); CompassHighlighter highlighter = thisHit.highlighter(); if ( highlighter != null ){ description = highlighter.fragmentsWithSeparator( JahiaSearchConstant.CONTENT_FULLTEXT_SEARCH_FIELD); description = description.replaceAll("\\r\\n", "\r"); description = description.replaceAll("\\r{2,}", "<br/>"); } ... Regards, Benjamin On 19.03.2009 15:47 Zanzico Gioele wrote: Hi, doing a search implementing the API of Jahia (Search.java) it works and the number of results seems correct. Doing the same search (the same search key) with the standard .jsp of Jahia (searchresults.jsp) in effect we get the same number of record, but the teaser is different. In our "custom" search they teaser seems to keep only a little bit of the description, with the "standard" search it is more long, more or less with all the content of the result. Does it is necessary to change something on our code to get the same teaser or using the API this is the correct result ? tks ciao gioele Zanzico Gioele Senior Web Analyst Vitec Group - Imaging & Staging Tel +39 0424 555 507 MailScanner has detected a possible fraud attempt from "www.manfrotto.com" claiming to be www.vitecgroup.it <blocked::http://www.manfrotto.com/> P Respect the environment: don't print this e-mail, if not necessary. ________________________________ _______________________________________________ dev_list mailing list [email protected] http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list
_______________________________________________ dev_list mailing list [email protected] http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list
