[opencms-dev] [Opencms-dev] Exclude an element from search result

Andrea Puddu docpuddu at tiscali.it
Mon May 31 11:02:50 CEST 2010


Hi Andrea,
I guess you should decide among two strategies.
One is create a new field configuration (in Admin -> search 
management.-> new field configuration..) without the field 
"UrlAssicurazione".
(So if the information is not present it can't be displayed of course)

The other one is keeping "UrlAssicurazione" in the index (you maybe 
interested in doing something in the future with this field...)
but when you display results (by coding in your jsp) you print only the 
wanted field (excluding UrlAssicurazione then)
(So the information is present in the index, but I display only what I 
want to show)

I hope the perspective I gave you, can help.
(ask more... if you need)

Ciao,
Andrea

---------------------------
Andrea Puddu
docpuddu at tiscali dot it
http://www.linkedin.com/in/andreapuddu
-------------------------------------------




Andrea Sforza ha scritto:
>
> Hi,
>
> I have a problem with search. I want to exclude from the listing of 
> search result a specific element of a schema.
>
> I have modified “opencms-search.xml” adding the following lines in the 
> standard field configuration:
>
> <fieldconfigurations>
>
> <fieldconfiguration>
>
> <name>standard</name>
>
> <description>The standard OpenCms 7.0 search index field 
> configuration.</description>
>
>>
> <field name="UrlAssicurazione" display="UrlAssicurazione" 
> store="false" index="true">
>
> <mapping type="item">UrlAssicurazione[1]</mapping>
>
> </field>
>
>>
> </fieldconfiguration>
>
> </fieldconfigurations>
>
> but in search result this element is displayed on the description and 
> I don’t want!
>
> *UrlAssicurazione* is the name of the element of the schema that i 
> want to exclude from search result.
>
> This is the schema:
>
> <xsd:complexType name="OpenCmsAssicurazione">
>
> <xsd:sequence>
>
>>
> <xsd:element name="UrlAssicurazione" type="OpenCmsString" 
> minOccurs="1" maxOccurs="1" /> …
>
> </xsd:sequence>
>
> </xsd:complexType>
>
> Greetings,
>
> Andrea.
>
> ----------------------------------------------------------------------
> CONFIDENTIALITY NOTICE
> La sicurezza e l'affidabilita' delle e-mail non e' garantita.  Noi
> adottiamo programmi anti virus, ma decliniamo ogni
> responsabilita' in ordine alla prevenzione degli eventuali virus.
> Tutte le e-mail da e per @moby.it sono comunicazioni alla Societa'
> e non private o riservate ad alcuna persona nominata.
> Security and reliability of e-mail is not guaranteed.  We operate
> anti-virus programmes but you must take full responsibility for
> virus checking.
> All e-mails from and to anyone @moby.it are communications
> to the company and not private and confidential to any named individual.
> ----------------------------------------------------------------------
>   
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> 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