Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Sorting the results of a Metadata Search
sleepyd
I've configured my TS5.5.2 system to implement the standard metadata capture and search. I'm trying now to customize the metadata search feature to include the ability to sort the output according to a subset of the metadata values.
I've modified iwsearchmetadata.ipl to introduce the new search parameters in the Search Metadata form.
I've modified SearchCommon.pm to read these parameters off the form submit to construct an "ORDER BY" clause to append to the query.
Problem is, I don't know where to attach that "ORDER BY" clause. When I try to attach it to the "WHERE" clause, my searches return no results.
The "WHERE" clause values ultimately get posted as the "-WHERE" parameter to /iw-bin/iwcgi.cgi/search. Is there another parameter that I can use to provide the "ORDER BY" clause?
Find more posts tagged with
Comments
Adam Stoller
NOTE: I have ***not*** tried any of this - I am not using this feature, so I am merely guessing by virtue of having poked around a bit.
Also NOTE: any modifications to files that are part of the TeamSite product deliverable such as these scripts is NOT supported, so you basically are using at your own risk.
(should you find a good general purpose rationale for being able to do what you want, please feel free to contact Interwoven Support to have them open up a Feature Request on your behalf).
With all that out of the way ...
I think the "guts" of the data processing is handled by TeamSite:
DeployParse.pm, but I *think* you might be able to avoid modifying that file and concentrate your efforts on modifying your own copy of iwsearchmetadata.ipl (if it's your own copy you don't have to worry about it being a modification to a product piece when patches / service packs / upgrades are applied - and you may be able to eventually get rid of it if your desired feature gets incorporatated at a later date).
[sorry - slipped back into caveat mode]
Try to take a look at what gets stuffed into $all_rows_info *after* the call to parse_ddeploy() - if it's reasonably structured, you might be able to split-sort-join it before printing it out. If 'split' is too unwieldy to handle it, you might be able to use something like HTML:
arser to handle it (I'm assuming its a stream of HTML-formatted text with table rows/cells embedded)
Sorry about al the caveats - good luck in your endeavors.
--fish
(Interwoven Senior Technical Consultant)
sleepyd
Thanks for your reply.
I took a look at the $all_rows_info variable in iwsearchmetadata.ipl. It turns out that this variable is responsible for printing out the form elements that will comprise the Search Metadata form, but it does not have any impact on the search results. I'm looking for a way to implement a sort on the search results themselves.
Any ideas?