I am looking for the equivalent of the GROUP BY statement but then for a FIND query.

I want to do a search on all fields of ContentVersion by a keyword and I want it to return a list of all values in a custom field.

The code below will return my search results listing:

FIND {"Test*"} IN ALL FIELDS RETURNING ContentVersion(Id, Title, My_Custom_Field__c LIMIT 10 OFFSET 0)

But now I want to build a filter for the customer that he/she can filter it on a specific My_Custom_Field__c value. I would imaging I should use a code like this:

FIND {"Test*"} IN ALL FIELDS RETURNING ContentVersion(My_Custom_Field__c GROUP BY My_Custom_Field__c)

This code returns the error "Unexpected token: GROUP".

But how should I solve this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.