Filtering search on folder path with Sitecore Contentsearch API

Using the new Sitecore contentsearch api allows you search against a lucene index with very little effort. Examples are a bit short on the ground but using Linq you can find yourself doing something like this to search for an item by name, somewhere within a folder structure:

public void BadSearch(string searchTerm)
{
   var webIndex = ContentSearchManager.GetIndex("sitecore_web_index");
   using (var context = webIndex.CreateSearchContext())
   {
      var results = context.GetQueryable<SearchResultItem>().Where(i =>
         i.Name == searchTerm &&
         i.Path.StartsWith("sitecore/content/stuff/")); // don't do this!
   }
}

This may well work. However you may also run into a Lucene error stating that you are using too many clauses, the default limit is 1024.

Continue reading Filtering search on folder path with Sitecore Contentsearch API

QoS setup with Draytek 2920n router using DSCP packet header for low priority backup traffic.

In short

I spent far too long figuring out how to do this not share it. Running an online backup service (Crashplan) on my laptop was killing my network for everything else that was using it. I documented in a previous post how to set DSCP packet headers on Windows 7 for Crashplan. This post is about the next step of doing something actually useful in the router. Continue reading QoS setup with Draytek 2920n router using DSCP packet header for low priority backup traffic.

De-prioritizing CrashPlan upload traffic with DSCP/TOS and QoS on Windows 7

Edit: See this post for a working practical config with a router that uses these settings.

Update 2013-05-30: The solution described at the end of this post is applicable to Windows 7 Professional and other non-‘home’ editions. Windows 7 Home Editions do not appear to have group policy editor (gpedit.msc) installed as standard.

I spent a fair amount of time trying to get to the bottom of this and so thought I would share my experiences, and partial successes. This post describes the issues I had trying to stop Crashplan’s upload traffic slowing down everything else on the network while utilising the available bandwidth for very large uploads. It talks about Differentiated Services Code Point or DSCP, QoS, Netmon packet monitor, Group Policy settings, and various unsuccessful fixes to the problem of Crashplans DSCP setting having no apparent effect either due to a bug or limitations of Windows 7. This post doesn’t discuss router configuration (to be part of a separate post), just Crashplan and DSCP on Windows 7.

Continue reading De-prioritizing CrashPlan upload traffic with DSCP/TOS and QoS on Windows 7

Updated database script for shared source ‘Redirect Manager’ module.

EDIT: 2012-May-24 This project has now moved to http://redirectmanager.codeplex.com

A quick update: The currently available blank database must be attached via Sql2008 R2 instance or later. For earlier versions there is now a revised SQL create script.
Continue reading Updated database script for shared source ‘Redirect Manager’ module.

Moved from WordPress.com to self-hosted WordPress.

I’ve had a blog hosted, mostly free, on WordPress.com for a while. I soon found that the ability to paste code, XML or HTML was severely limited by clean-up functions that would strip-out the data whenever I saved or switched between ‘Visual’ and ‘HTML’ views. Continue reading Moved from WordPress.com to self-hosted WordPress.