About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« How Microsoft manages their press... | Main| Book Review - The Power of Ren: China's Coaching Phenomenon »

Is is possible to programmatically access Section properties?

Category IBM/Lotus
We're implementing a Google search appliance at work, and indexing text in sections has been a bit problematic.  If the section is set to auto-expand, indexing works fine.  But if the text is set to auto-collapse, then the indexing ignores the text in the section.  And for the particular applications we're targeting on this appliance, there are *many, many* sections, all set to auto-collapse.

I've been able to stick a JavaScript routine at the end of the page load to collapse everything down, so having the document display sections as expanded for indexing but collapsing them on open works OK.  My problem is that there are thousands of documents where the sections would have to be reset from auto-collapse to auto-expand.  Not something I (nor the users) want to contemplate.

Is it possible to somehow write a script to programmatically access the section properties in a document?  I'd like to hit up against all the documents, convert the section launch properties, and then save the document back in place.  LotusScript (from my knowledge level) would be ideal.  I know nothing about the C API if that's the route I need to go.  Is DXL a possibility?

And before you ask...  We filter out URLs that have ExpandSection in them.  If you leave that there, the search appliance grabs all variations of section openings.  Each variation becomes a new document that's crawled.  When we did that, we went from 38000 documents being served to nearly 5 million being crawled and 400K being served.  In addition, the search results came up with a lot of duplicate results due to the varying URLs.  So URL manipulation is (I think) out of the question...

Any and all suggestions graciously accepted and considered...

Comments

Gravatar Image1 - DXL would do the trick: the section element has an attribute of expanded, set to true or false, as well as tokens of onedit, onpreview, onprint, and onread that can be set to collapse or expand. Importing data is tricky, though, because unlike design, it creates a duplicate instead of overwriting the existing document. On the bright side, here's an approach that should work:
- Export each document to a DXL stream
- Do a search/replace to update the section properties
- Import the modified DXL as a temporary document
- Use the importer's .GetFirstImportedID method to get a handle on the temporary document
- Overwrite the original document's item value with the temporary document's data
- Delete the temporary document

Messy, but thorough. Hope that helps.

Gravatar Image2 - Did you check with Ben L? It seems like the sort of thing Midas might do in about 3 lines of code. Failing that, I think DXL is your best option.

Gravatar Image3 - Computer Dude, I hope your friends (aka Lotus Geeks) can help you out with this one. Just know that if I have to go into every document to auto expand all of these sections I will.....However, I will not be happy about it. Thank you for everything you do....You Totally ROCK Dude

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...