[opencms-dev] CmsSearch: all results

Ernesto De Santis opencms at colaborativa.net
Tue Mar 14 18:00:44 CET 2006


For others contents your search work?

I had problems searching custom xmlcontents.

I remember that the problem was a bad custom xmlcontent definition. And 
the indexed don't index my custom xmlcontents properly.

Regards
Ernesto.

azul z escribió:
> thanks Joe; i've tried with no results
> 
> my site is under /sites so the initial query is ok
> 
> using "content" field works ok so for some reason searching
> on type field is no working for me
> 
> is there somethink special related to that field? do i have to do
> somethink special when creating my xml content resources?
> 
> which class is responsible to perform the search on xml content
> obtaining the fields from the vfs file? perhaps that's the problem...
> 
> 
> i'm becoming dizzy..................
> 
> thanks
> Cristina
> 
>     ------------------------------------------------------------------------
>     From:  /"Joe Desbonnet" <jdesbonnet at gmail.com>/
>     Reply-To:  /joe at galway.net, 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 16:36:09 +0000/
>      >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
>      > >
>      > >
>      >
>      >_______________________________________________
>      >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
> 
> 
> ------------------------------------------------------------------------
> Tu horóscopo diario, semanal y gratuito. Cartas, tarot y predicciones en 
> MSN Horóscopo <http://g.msn.com/8HMBESES/2728??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/49b3e69b/attachment.vcf>


More information about the opencms-dev mailing list