Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Search cssdk
notchat
Does anyone know how to iterate through results in a CSSearchRecordData object returned from the Search Web Service in the cssdk? I am consuming the service via c#. I noticed there is a GetEnumerator() method but it still isn't clear how to work with this...
Thanks.
Find more posts tagged with
Comments
notchat
Ok if I do this:
System.Collections.IEnumerator enu = result.records.GetEnumerator();
while (enu.MoveNext())
{
SearchService.CSSearchRecordData rec = (SearchService.CSSearchRecordData)enu.Current;
Response.Write("Score: " + rec.relevance + "<br>VPATH: " + rec.fileVPath + "<p>");
}
I can iterate and get the VPath and the verity relevance score(?).... but that is all. Is the intention that we use the vpath to get the rest of the information about the document using the interwoven API?
It looks like the intent is for the filesys web service to be used to get extended attributes based on vpath...
Is it possible for the service to just return an XML document containing the results?
notchat
This works as an example:
String[] fields = {"TeamSite/Metadata/dc.description", "TeamSite/Metadata/dc.title"};
System.Collections.IEnumerator enu = results.records.GetEnumerator();
while (enu.MoveNext())
{
SearchService.CSSearchRecordData rec = (SearchService.CSSearchRecordData)enu.Current;
FileService.CSExtendedAttribute[] fileAtt = fsBinding.getExtendedAttributes(fsContext, rec.fileVPath, fields);
for (int i=0; i < fileAtt.Length; i++)
{
Response.Write(fileAtt
.name + ": " + fileAtt
.value + "<br>");
}
Response.Write(rec.fileVPath + "<br>");
Response.Write("<p>");
}