1

In Sitecore 9 or 10 - I'm not sure which as I skipped v9 - Sitecore have removed Sitecore.Pipelines.Search.IDResolver which is used in the search pipeline as defined in the OOTB Sitecore config in SC8:

<search>
  <processor type="Sitecore.Pipelines.Search.IDResolver, Sitecore.Kernel"/>
  <processor type="Sitecore.Pipelines.Search.PathResolver, Sitecore.Kernel"/>
  <processor type="Sitecore.Pipelines.Search.UrlResolver, Sitecore.Kernel"/>
  <processor type="Sitecore.Pipelines.Search.SecurityResolver, Sitecore.Kernel"/>
  <processor type="Sitecore.Pipelines.Search.DatabaseResolver, Sitecore.Kernel"/>
  <processor type="Sitecore.Pipelines.Search.CategorizeResults, Sitecore.Kernel"/>
  <processor type="Sitecore.Pipelines.Search.AddInstantOptions, Sitecore.Kernel"/>
</search>

In SC10 this pipeline has been somewhat streamlined to the following:

<search>
  <processor type="Sitecore.Pipelines.Search.UrlResolver, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.Search.SecurityResolver, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.Search.DatabaseResolver, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.Search.CategorizeResults, Sitecore.Kernel" />
</search>

The IDResolver pipeline processor provides an amazingly simple, effective and performant "Direct hit" search result, which a lot of my users rely on and actually use every single day. It supports multiple formats of GUID, which is another great feature. It looks like this:

enter image description here

It bypasses the search indexes, which is a good thing since indexes can exclude results for various reasons, e.g.

  • they can get out of sync with the real data
  • they can have custom config applied to filter inbound and outbound data
  • they can have custom config applied to alter the root node of the index
  • they can be altered by any number of other possible config patches/customizations which are entirely valid setups

I've managed to re-introduce this functionality by copying the decompiled legacy processor class into my codebase and patching it into the pipeline. It works perfectly and because it's in my codebase I know it won't actually be deleted by Sitecore on the next upgrade.

I guess my question is: WHY? I don't see any reason to do this, it just makes the product worse and doesn't add anything. It's not even a complex piece of code to maintain, nor does it use any APIs which are going to be deprecated in the future (unless they plan to deprecate Database.GetItem()!!) It's removal is not documented anywhere that I can tell. I had to find out by decompiling the Sitecore assemblies and diffing old and new config files.

1 Answer 1

1

Both IDResolver and PathResolver are not fully removed in Sitecore 10.1 yet. They are marked as deprecated and they're going to be removed in one of the next major releases.

But their code is still there and you can use it if you want. Just use patch file like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
  <sitecore role:require="Standalone or ContentManagement or ContentDelivery">
    <pipelines>
      <search>
        <processor 
          patch:before="*[@type='Sitecore.Pipelines.Search.UrlResolver, Sitecore.Kernel']" 
          type="Sitecore.Pipelines.Search.IDResolver, Sitecore.Kernel" />
        <processor 
          patch:before="*[@type='Sitecore.Pipelines.Search.UrlResolver, Sitecore.Kernel']" 
          type="Sitecore.Pipelines.Search.PathResolver, Sitecore.Kernel" />
      </search>
    </pipelines>
  </sitecore>
</configuration>

I don't know what's the reason of making them deprecated. You may try asking this question to Sitecore Support, but I don't think you will get any answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.