0

I am new to IBM SBT SDK search API implementation class "SearchService".

How can I get a typed entity like Community or Forum or ForumTopic from the search result entry type Result?

The Java type Result is very general, but the XML returned from Connections already contains all relevant data as it seems. Is there a kind of "conversion" or "cast" available?

  • a member of SDK team will respond shortly – Paul Bastide Apr 10 '15 at 19:41
  • 1
    Hi Christian. Implicit conversions between entities is not supported right now. Most of the user scenarios so far have included fetching the search feed and then making service specific api calls to fetch more details around specific resource. However there are use cases where fetched information should suffice as you have pointed out and typecasting this would be useful. Would you like to code this up and contribute back to SBT ? – Manish Kataria Apr 13 '15 at 09:06
  • I have to admit that I currently have no good idea how to achieve that -- except serializing the Result entry and deserializing the output as a Community or whatever else. The "deserialize" step should do some kind of "try best match" logic, or look for the category entry containing the "primaryFooBar" sub node which marks the entry type describing node. (I have no actual sample at hand, so this is just from what I remember.) -- At the moment I guess the "target type" and use the ID to try a direct load. I will report how that works -- not very nice, but may be a way to do it. – Christian Gosch Apr 14 '15 at 10:35

0 Answers0