[opencms-dev] CmsSearch: all results

Ernesto De Santis opencms at colaborativa.net
Tue Mar 14 16:05:03 CET 2006


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opencms.vcf
Type: text/x-vcard
Size: 263 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060314/1f00f7b9/attachment.vcf>


More information about the opencms-dev mailing list