Try our conversational search powered by Generative AI!

Searching for multiple IUser attributes


I´m having a problem when searching for multiple user attributes and I don´t want them all to be required. Example: I want to display all users containing query text "developers" in either in attribute "title" OR in attribute "profession".

Is there a way to set the criteria to Required=false like in PropertyCriteria?


StringCriterion criteria = new StringCriterion();
criteria.Value = queryText;
criteria.WildCardType = WildCardType.Both;
criteria.Required = false;
attributeQuery[attribute] = criteria;

Nov 26, 2009 11:35

I think I might use a CriteriaGroup for that. Karoline Klever has an example here:

Nov 26, 2009 14:00

That works like a charm! Thanks!

Nov 26, 2009 15:48
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.