0

I currently have an SOSL query

[FIND :finalSearchText IN ALL FIELDS  RETURNING FeedItem(Id, Title WHERE Type = 'QuestionPost') LIMIT 10];

This works great for searching the feed item title and body.

What would be preferred is if the query would search for feed items in the title, body and against the topics as well.

Ideally, I would love if the search could return an original post if the replies were returned too.

Does anyone know how to make a query that can search all fields as well as topics?

0

Normally, the query you have would search for QuestionPosts that have any fields with the string you pass to :finalSearchText

However, it is important to note that this query will not search the related object TopicAssignment, which is what you seem to be trying to search in. So, that functionality is not really supported to my knowledge.

You can however, create a "cutsom field" and map the assigned topics to it and that would be searchable.

Also to be noted, not all field types are searchable using SOSL.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.