Thursday, March 12, 2009

Undocumented dtSearch Synopsis Trick

I've worked with dtSearch before on other projects and have used other ones since then. I'm currently working on a project that uses dtSearch as the primary search engine. There's always a synopsis for a search result and the dtSearch module actually provides a XSLT helper.

If you just want to know how to do it, then follow this quick steps:
  1. Create an index in dtSearch using the Create Index(advanced) option.
  2. In the Create Index(advanced) window, make sure to check "Cache document text in index" and/or "Cache documents in index". This tells the dtSearch indexer to keep a copy of the content that's being index.
  3. Add a Sitecore setting in web.config named "dtSearchSynopsis" with the value "true".
  4. Update your XSLT Rendering to get the content in the search result set that comes back from the Search function.

Now, if you want a more detailed explanation, read on.

The dtSearch XSLT Helper's GetSynopsisNavigator() method requires:

  • pageUrl
  • search term
  • css highlighter style name
  • length of the sysnopsis

The method uses the page Url so that it can access it able to extract the page's content. Then it truncates the content while making sure that the search term is in the synopsis. Finally, it looks for the search term and re-formats it between a tag with the specified css class name. And it returns the string. Of course, it does some other things also such as remove scripts, tags, etc. to give you a nice clean synopsis.

Well, sometimes it's clean. The problem with this approach is that the synopsis will always return almost the same set of synopsis when the search term is something that's found on the top part of the page such as your navigations, etc. For instance, if you have a site that has a ubiquitous utility bar with "Contact Us". So, this text phrase exists on every page. Now, if you search for the word "Contact", dtSearch will return basically all pages as the set of results and the synopsis for each will be very odd using GetSynopsisNavigator() and will always include the utility bar content even though those parts of the site are really skeletal pieces that should not be searched.

So, you might think that it's an issue with the indexer. Well, that's partly true. To let dtSearch index only particular parts of the page, you need to use the that is documented in SDN5 and at dtSearch's site. So, you basically put the comment markers appropriately and it will only index, say, the main body content of the page and not the footer text, headers, callouts, and other supporting/related content.

At this point, we've only solved that dtSearch should only index appropriate content so that it doesn't return "ALL" the pages. The next part is to get the synopsis corrected. Well, I accidentally found this out by going through the intermediate language for the dtSearch module. I read it through to figure out how it works. Then, I noticed that it's actually possible to generate synopsis as part of the result set as returned by the module's XSLT Helper Search() function.

To do so, you'll need to add an undocumented Sitecore setting for dtSearch named "dtSearchSynopsis" with the value "true". This tells the dtSearch module's XSLT Helper to add a tag in the result set that comes back from the Search() function. The synopsis automatically adds "<b>" around the search term. The synopsis looks pretty good and there are no truncated words because of the # of characters limit.

Sometimes you might get some odd results, so you just need to fine-tune where you place your comments. Make sure that the indexer is able to see the scID and scPath meta tags since the dtSearch module uses them to find items.

Well, that's it. I hope that helps.

Monday, January 19, 2009

Technical DeepDive: Sitecore v6 Security

First off, I want to announce that we just moved our offices to a much larger and spacious office space. I'm excited for our future and our potential. So, expect greater things from Roundedcube. If curious, you can find out more about our move.

So back to our main topic here. As I said from my welcome post, I'm going to have a technical perspective of Sitecore as well. For these types of posts, I'm going to envelop them into what I call a Technical DeepDive. During technical sales presentations, these types of presentations become very important for technical audiences who tend to evaluate a product based on technical details without the marketing wrapping. We're going to start with one of Sitecore v6's important changes, the use of .NET 2.0 security framework.

To read further, I need to tell you that this is not about ASP.NET 2.0 security mechanism but on how Sitecore leverages it and how it is applied. So, you'll need to know about ASP.NET security mechanism before you read on. There's a great introduction from MSDN with related articles for your reading.

In the past, Sitecore maintained its own version of a security context. As a developer, you need to remember that the ASP.NET security context is different from Sitecore's. So, there were three ways to work with Sitecore's security:

  • use Sitecore's security context exclusively and integrating into Sitecore's extranet domain

  • use ASP.NET security exclusively

  • use both but making sure they are in synch

In Sitecore v6, both ASP.NET and Sitecore security context are the same...or I should say that Sitecore taps into ASP.NET's context instead of managing its own. However, this doesn't mean that Sitecore essentially is just ASP.NET. Sitecore only uses the provider model and uses the same context but Sitecore's context is much more powerful and what Sitecore does with it. Here's a list of things we'll discuss:

  • New UI
  • New Access Rights
  • Inheritance
  • Roles within Roles
  • Enhanced Domain Management

On my next Technical DeepDive, we'll talk about the new security UI's.


Friday, January 16, 2009

Sitecore Roadmap after Crestone Part 2

This is the second part of my blurb on the roadmap after Crestone. If you haven't read the first part, click here.

On this part, we'll talk about the:
  • Embedded Social computing and "WOM" capabilities
  • Integrated faceted navigation and guided search
  • Content orchestration and delivery tools
  • Reporting and customization engine

One of the things I really like about Sitecore is it's focus on CMS technologies and practices. There are other CMS's out there that only get market share only because they provide out-of-the-box applications that popular sites have such as blogs, forums, etc. What happens is that companies that look at those other CMS's tend to change their focus from keeping their site business/customer-oriented to something that's dictated by the technology. I believe that one needs to know technology to make better decisions but they should not hinder or refocus a plan but rather supplement as a means. So, when I saw Sitecore releasing an embedded social computing and "WOM" framework, I was initially taken aback. But after the initial shock, I've come to realize that it is time for Sitecore to show what its platform can do. The CMS is solid and there's no question about it. The only thing I request is that Sitecore do not redirect their efforts to creating "extra" stuff for marketability only but to keep pushing what a CMS should be. I'm excited that Sitecore has a "Twin Peaks" release that makes the CMS more scalable and reliable. These types of enhancements tell me that Sitecore has not lost its vision of a true Web CMS.

Outside of that little editorial, the embedded social computing should help in delivering some of the popular features now almost common on various sites. I've used Community Server and have integrated it with Sitecore and it's a gem. I know that Sitecore's Forum module is based on the ASP.NET Forums which turned to Telligent's Community Server...so I'm assuming that I' see some similarity in the future. Since I like CS, I'm hoping that the embedded framework does not prevent us (or make it harder) for us to integrate a stand-alone third-party system. We'll see if Sitecore implements the OpenSocial standards which MySpace, LinkedIn, imeem, Plaxo, Oracle, and others already implement. If so, then integration will be easier. (Side note: At the time of this writing, there's no .NET client library yet...any volunteers?)

What's Faceted Search? Some people might know this...and actually, you might know it or seen it. When you go shopping for a digital camera (just to be in line with the Nicam demo), you might like to shop by price, and then maybe by megapixels, and then by lenses. Another person may actually want to shop by brand, then color, and then price. This is now pretty common on big e-commerce sites that has a lot of products. This is faceted navigation. It essentially helps you to filter things down to something that's easier to navigate but it doesn't restrict you on how you do the filtering. It's almost categories but more of a dynamic grouping that reacts to your choices. So, if Sitecore can get this for us out-of-the box, then WOW!!! I can imagine a library of thousands of resources (articles, books, DVDs, etc) that is much easier to navigate. I would even suggest that this particular navigation be available on the CMS itself as part of a new Manager to find content items faster.

I know that some advanced faceted navigation systems out there even do the taxonomy for you. That requires some artificial intelligence in some neural network or genetic algorithm but I don't expect that here (yet). If this does become available, just imagine, you can automate some of your SEO processes.

If you're not aware of this, you can read up on Derek Roberti's article from a year ago about Sitecore as an aggregation engine. He explains orchestration and how Sitecore can actually do it (even before v6). He does indicate that it's not that easy to do orchestration only because of the definition of business rules and how customization becomes part of the implementation. With that said, I'm hoping that some of the challenges cited by Derek have been addressed (at least some of it). I'm sure new tools will make it easier for us make decisions on how content should be delivered based on some industry practices. Some companies don't really know what are the efficient way of doing things, so I expect that these new orchestration tools will have built-in best-practices already. By the way, these tools even become more important because the more Sitecore becomes more powerful and scalable, the more targets and sources we have.

Finally, Sitecore promises to deliver a reporting and customization engine. Let's start with the customization engine. Well, Sitecore is highly-customizable but does require technical knowledge to fully customize it. I'm not entirely sure if this is on the UI side or on the application behavior. Either one or both would be great. For the reporting, I'm excited about this. We created a while back a reporting XAML application for tracking purposes. It serves its purposes but it does take time to create one. I like the idea of allowing content editors/admins to be able to create ad-hoc reports similar to SQL Server Reporting Server. This will even simplify views for custom applications that use Sitecore as its data storage such as answers to surveys. For me, I'd like to see better administrative reports. If I can have something similar to the Event Viewer in Windows, I'm in heaven. Just a thought.

We have a lot to look forward to with Sitecore. Everything is going in the right direction and as a partner, I have to be thankful to Sitecore folks for moving the product forward. I just hope I can keep up with them.

Sitecore Roadmap after Crestone Part 1

I was really happy when Sitecore announced Crestone early last year. We were part of the beta program and we were certainly ecstatic about the future of Crestone. Now that it's in full version 6 and us implementing about 4 of these, our clients and us know how much better the product has become. The In-Line editing is just amazing and then couple with the Grid and Page Designers give non-technical folks much more control of "their" site. Of course, there's the much-awaited switch to using the .NET security framework which made security development and integration so much easier. It really opened integration with other systems a much easier and cheaper process. Our clients love that.

So, what's next with Sitecore after Crestone? According to the published Core roadmap, Sitecore is gathering input regarding this, particularly in the user-experience (UX) domain, codenamed the "Everest" release. The release aims to achieve the following:
  • Integrated analytics
  • Profiling and personalization
  • Embedded Social computing and "WOM" capabilities
  • Integrated faceted navigation and guided search
  • Content orchestration and delivery tools
  • Reporting and customization engine

Just to make sure, I don't work for Sitecore and I have no idea at this point what exactly all these are going to be. I haven't spoken to a Sitecore employee regarding these features. I'd like to just share my thoughts on what would be "cool" to have within these features and some other ones in my head. Since that's a lot of bullet points, I'll talk about these in two parts. Click here to see Part 2.

Is Integrated Analytics and boosted version of the StatCenter? I hope not. StatCenter has its strength when it comes to CMS usage and such but not necessarily on site usage. That's why when we implement a site, we normally use either one of the commercial services like Omniture, or products like WebTrends or Urchin, or even the free Google Analytics. All these companies are improving their analysis engine but do not yet fully deliver a Web 2.0 analysis. My guess is that the Sitecore one will be similar to the Telligent Harvest reporting server, which gives Community Server owners detailed information about their community. If this is the case, then that's great. I'm glad Sitecore is not thinking of competing with Web analytics packages since most companies already have heavily invested in them especially those who even outsource their SEO.

In a way, Sitecore always had profiling and personalization because of the built-in user-profiles. Now that Sitecore uses the .NET 2.0 security mechanism, it's even easier to do this. However, "easier" is a relative term. This may already exist but I'm hoping that Sitecore is not just creating a bunch of templates that hold more profile and personalization information or even make it easier to extend. I'm hoping to see the peripheral applications that make a profile powerful which I assume will be in th embedded social computing features. One thing I'd like to see is being able to use or combine existing profiles from other systems such as Facebook but I'm sure we can always create a custom-developed interface for that.

Well, that's it for now. Read the second part of this article on another post.

Friday, January 9, 2009

Welcome to Roundedcube on Sitecore

This is my first blog ever and the biggest challenge I've had is to figure out what to write. So, I thought I give my kudos to the Sitecore world regarding its continued growth. Since 2005, we've been implementing Sitecore solutions and it started in v4.3. For those who had never seen that version, just think of the Content Manager in the later versions. However, the concepts were solid then and most of it remains in tact today (except for some that are now obsolete).


Well, this blog is not about praising Sitecore (though they deserve it). This is about giving back to the Sitecore community (it's about time). I'm now mostly involved in the sales process, so my knowledge about the product, particularly implementation, helps me to explain what a Sitecore project is. I'm going to involve other members of my team to write so you'll see a variety of Sitecore-related information from the user's perspective to architect-level designs. You will also see content related to budgeting, project teams, and maybe once in a while some fun tidbits and my commentaries on the world of Sitecore.

If you ever have any topics you want me or any of my fellow bloggers to discuss, let meknow. We'd like to be as interactive as we can. Don't hesitate to give us a bad score about our knowledge since it just gives us more motivation to learn more. If you do find something useful, I'm sure you'll give us some kudos as well. If you know me by any chance, give me a shout and I hope that you're looking forward to my blog posts.

You can contact anyone at Roundedcube regarding Sitecore or email me at sitecore@roundedcube.com. You can visit our website at http://www.roundedcube.com/ as well.

Enjoy!!!