Question

I'm using Sitecore Forward Search. Currently I've added a replace into web.config file to replace spaces in item names from one character to another. And now, in item URLs, spaces are replaced by one character and forward search still generates links with another character. How to fix this problem? I've tried to re-index Search index, but it still the same. I appreciate any help you can provide.

Was it helpful?

Solution

First, I would recommend going back to a standard hyphen rather than an em dash. Em dash is a non-standard character. Very few users would even realize the difference between that and a hyphen and even if they did, they wouldn't know how to type it.

Disclaimer aside, if your links are being generated properly when you browse the site, your search engine should be picking them up. Did you just run the indexer or did you do a "Clean re-index"? If it is still not getting the correct URLs after a clean re-index, I would double (or triple) check your configs and then contact Forward Search support.

OTHER TIPS

You might want to try this module I created: SEO-friendly URL module

It implements a custom LinkProvider and ItemResolver that replaces special characters in your URL, one of them being spaces replaced for hyphens (-).

The thing you're doing now is simply replacing spaces for hyphens, but Sitecore is then not able to resolve the items anymore.

Ben is right, a "clean reindex" might do the trick, but it depends on version.

Manual approach:

  1. Delete Index folder(location might depend on configuration)
  2. Delete Storage subfolder(location defaultly as subfolder to ForwardData)
  3. Trigger a full update(Trigger tool or admin client)

At this point Forward Search should index the site in the context of a normal visitor and links should be resolved as such.

Sometimes there are certain navigation elements as breadcrumbs which by mistake generate other/duplicate links; like links with "Sitecore/content" as prefix or a language specification. This can be circumvented by using canonical or adjusting the exclude pattern.

Best regards Thomas Jensen, Part of the Forward Search team

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top