[opencms-dev] CmsSearch: all results

Joe Desbonnet jdesbonnet at gmail.com
Tue Mar 14 17:36:09 CET 2006


This could be related to problems I' ve been having with search: see this post:
http://mail.opencms.org/pipermail/opencms-dev/2006q1/021797.html

Joe.

On 3/14/06, azul z <zazul_ at hotmail.com> wrote:
>
>
>
> while searching for my xml content type (Noticia) OpenCms generates this
> query:
>
> +root:"root at o.c sites at o.c default at o.c" +type:noticia
>
> (i've noticed the lowercase n in noticia but trying 'article' show
> no results anyway
>
> +root:"root at o.c sites at o.c default at o.c" +type:article
>
>
> that's my code:
>   search.setIndex("Offline project (VFS)");
>
>   search.setField(new String[] { I_CmsDocumentFactory.DOC_TYPE });
>   search.setQuery("Noticia");
>   List results = search.getSearchResult();
>
>
> Noticia is defined in opencms-modules.xml as:
> <type
> class="org.opencms.file.types.CmsResourceTypeXmlContent"
> ...>
>
>
> this query
>    +root:"root at o.c sites at o.c default at o.c" +type:xmlcontent
> shows 0 results too
>
>
> any idea?
>
> thanks
>
>
>
>  ________________________________
>  From: "azul z" <zazul_ at hotmail.com>
>
> Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
> To: opencms-dev at opencms.org
>
> Subject: Re: [opencms-dev] CmsSearch: all results
> Date: Tue, 14 Mar 2006 15:42:51 +0000
>
>
>
>
>
>
> thanks, but no way
>
> i've tried both forms (trying field title, rebuilding indexes, etc) without
> results
>
> have u Ernesto or someone sample code on this topic?
>
>
> thanks
> Cristina
>
>
>
>  ________________________________
>
> From:  Ernesto De Santis <opencms at colaborativa.net>
> Reply-To:  The OpenCms mailing list <opencms-dev at opencms.org>
> To:  The OpenCms mailing list <opencms-dev at opencms.org>
> Subject:  Re: [opencms-dev] CmsSearch: all results
> Date:  Tue, 14 Mar 2006 12:05:03 -0300
> >mmm, try in this way:
> >
> >search.setField(new String[] { I_CmsDocumentFactory.DOC_TYPE });
> >search.setQuery("Noticia");
> >
> >Sorry, In the first line you say in which fields you search.
> >field:value is the lucene syntax.
> >
> >Regards
> >Ernesto.
> >
> >azul z escribió:
> >>thanks Ernesto for your help
> >>
> >>let's see if i've understood u
> >>
> >>i've tried to retrieve all contents using type field:
> >>
> >>search.setField(new String[] { I_CmsDocumentFactory.DOC_TYPE });
> >>search.setQuery(I_CmsDocumentFactory.DOC_TYPE + ":Noticia");
> >>
> >>(Noticia is my own xml content type)
> >>
> >>is that a right way? i've tried but 0 results obtained...
> >>
> >>thanks
> >>Cristina
> >>
> >>
> >>------------------------------------------------------------------------
> >>     From:  /Ernesto De Santis <opencms at colaborativa.net>/
> >>     Reply-To:  /The OpenCms mailing list
> >><opencms-dev at opencms.org>/
> >>     To:  /The OpenCms mailing list <opencms-dev at opencms.org>/
> >>     Subject:  /Re: [opencms-dev] CmsSearch: all results/
> >>     Date:  /Tue, 14 Mar 2006 11:11:55 -0300/
> >>      >In lucene you can't search for all contents or empty values
> >>in
> >>      >field.
> >>      >You need index an extra field to do it.
> >>      >
> >>      >Example:
> >>      >for all contents index a field "all" with value "true".
> >>      >
> >>      >Then, you can search:
> >>      >
> >>      >cmsSearch.setQuery("all:true");
> >>      >
> >>      >Regards,
> >>      >Ernesto.
> >>      >
> >>      >azul z escribió:
> >>      >>hi list
> >>      >>  how can i instruct lucene to obtaing all results?
> >>      >>  if i try
> >>      >>     cmsSearch.setQuery("");
> >>      >>zero results are obtained
> >>      >>  which is the right query?
> >>      >>  thanks
> >>      >>cristina
> >>      >>
> >>
> >>
> >>------------------------------------------------------------------------
> >>      >>Éxitos, grandes clásicos y novedades. Un millón de
> >>canciones en MSN
> >>      >>Music. <http://g.msn.com/8HMAESES/2755??PS=47575>
> >>      >>
> >>      >>
> >>
> >>
> >>------------------------------------------------------------------------
> >>      >>
> >>      >>
> >>      >>_______________________________________________
> >>      >>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/mailman/listinfo/opencms-dev
> >>      >>
> >>      >>
> >>
> >>
> >>------------------------------------------------------------------------
> >>      >>
> >>      >>No virus found in this incoming message.
> >>      >>Checked by AVG Free Edition.
> >>      >>Version: 7.1.385 / Virus Database: 268.2.2/280 - Release
> >>Date:
> >>      >>13/03/2006
> >>
> >>      ><< opencms.vcf >>
> >>
> >>      >
> >>      >_______________________________________________
> >>      >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/mailman/listinfo/opencms-dev
> >>
> >>
> >>------------------------------------------------------------------------
> >>Acepta el reto MSN Premium: incluye Antivirus y Firewall de
> >>McAffee. Descárgalo y pruébalo 2 meses gratis.
> >><http://g.msn.com/8HMAESES/2731??PS=47575>
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>
> >>_______________________________________________
> >>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/mailman/listinfo/opencms-dev
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>No virus found in this incoming message.
> >>Checked by AVG Free Edition.
> >>Version: 7.1.385 / Virus Database: 268.2.2/280 - Release Date:
> >>13/03/2006
>
>
> ><< opencms.vcf >>
>
>
> >
> >_______________________________________________
> >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/mailman/listinfo/opencms-dev
>
>
>
>
>
>
>
>  ________________________________
>  Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee.
> Descárgalo y pruébalo 2 meses gratis.
>
>
> >
> >_______________________________________________
> >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/mailman/listinfo/opencms-dev
>
>
>
>
>
>
> ________________________________
> Acepta el reto MSN Premium: incluye Antivirus y Firewall de McAffee.
> Descárgalo y pruébalo 2 meses gratis.
>
> _______________________________________________
> 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/mailman/listinfo/opencms-dev
>
>



More information about the opencms-dev mailing list