This discussion is archived
1 Reply Latest reply: Jun 23, 2008 8:24 AM by 560578 RSS

Retrieving custom attributes from a searchManager.search() query

560578 Newbie
Currently Being Moderated
Hi all!
I'm trying to do a search using the searchManager search method and retrieve custom attrbute at the same time. I tried using the syntax used in the search query ( [CATEGORY_CLASS_NAME:ATTRI_NAME] i.e: [49873-333443-334:CUSTOM_31928]
) and passing this as an AttributeRequest, but with no results.

Can someone tell me how they do this ?

Thanks!
  • 1. Re: Retrieving custom attributes from a searchManager.search() query
    560578 Newbie
    Currently Being Moderated
    I found out that by using the following AttributeRequest, I can obtain ALL the custom attributes. But is there a way to filter and ask for specifics ?

    code:
    AttributeRequest[] attriMeta = new AttributeRequest[1];
    attriMeta[0] = ClientUtils.newAttributeRequest( Attributes.CUSTOM_ALL );
    attrs[5] = ClientUtils.newAttributeRequest( Attributes.CATEGORIES, attriMeta );

    and then search( ..,.., attrs );