[opencms-dev] RE: Help for searching in opencms
Jason Trump
jason.trump at brulant.com
Tue May 23 15:47:09 CEST 2006
I would guess that your problem is not with your JSP code, but with your search index definition, which is in opencms-search.xml. A few questions:
What version of OpenCms are you using?
What is the path of the HTML document in your repository (for example, /sites/default/foo.html)?
Are you building a multi-language site?
What is the locale setting for the documents you are trying to search?
Have you made any modifications to the opencms-search.xml file, or are you still dealing with a clean install?
I have CC'd the mailing list, as there might be others there who can help with this. I recommend that you post the answers to these questions, along with a copy of your opencms-search.xml file, to the mailing list.
You need to make sure that:
1. there is a "<documenttype>" element for the HTML type defined in the "<documenttypes>" element. There should also be "xmlpage" and "xmlcontent" document types (which are also HTML documents that are stored in XML format).
2. if you are building a multi-language site, make sure that you have an "<analyzer>" element (and possibly a "<stemmer>" element) defined for you language inside of "<analyzers>".
3. there is an "<indexsource>" element that contains the folder where your HTML documents are stored under "<resources>", as well as "xmlcontent", "xmlpage", and "html" entries in the "<documenttypes-indexed>" element.
And probably some other stuff that I forgot :)
-jt
> -----Original Message-----
> From: Inmaculada Piquero Buedo [mailto:inpibu at hotmail.com]
> Sent: Tuesday, May 23, 2006 7:31 AM
> To: Jason Trump
> Subject: Help for searching in opencms
>
> Hello.
>
> I´m working with opencms, and I´m using the search bean.
>
>
> I´m using, this code in my jsp to make a "searcher" in opencms:
>
> <jsp:useBean id="search" scope="request"
> class="org.opencms.search.CmsSearch">
>
> <jsp:setProperty name="search" property="index" value="Online project
> (VFS)"/>
>
> <jsp:setProperty name="search" property="matchesPerPage"
> value='<%=Integer.MAX_VALUE%>' />
>
> <jsp:setProperty name="search" property="query" param="query" />
> <%
> search.init(cms.getCmsObject());
> %>
>
> </jsp:useBean>
> ........
> .......
>
> The idea, is, that, after this code, I have something like:
>
> CmsSearchResult entry = (CmsSearchResult)iterator.next();
>
> And I make a route between my elements, and then, I use some expressions
> like: entry.getExcerpt(),entry.getPath() .. and I show the results of the
> query.
>
>
> The problem is that, in spite of getting even PDF files, I don´t get
> HTMLs.
> I can´t get HTMLs files.
>
> I don´t know where is the problem.
> I´ve been looking the opencms-search.xml file, but I don´t have a clue.
>
>
> Please, could you giving me some advices?
> How to indicate to search in HTML files too???
>
> Thanks in advance.
> Regards,
> Inma.
>
> _________________________________________________________________
> Acepta el reto MSN Premium: Correos más divertidos con fotos y textos
> increíbles en MSN Premium. Descárgalo y pruébalo 2 meses gratis.
> http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_correosmasd
> ivertidos
More information about the opencms-dev
mailing list