prevent Smart Search from picking up navigation links?

James Ison asked on March 23, 2020 19:51

I have a bunch of search results that are showing up because the header and footer have links in them with the keyword. How do I prevent navigation from being picked up by search?

Recent Answers


Brenden Kehren answered on March 23, 2020 20:18

My guess is you're not doing "Page" search index, probably using the "Pages Crawler" index. Using a "Pages" index is the best way to eliminate those. If you're using the "Pages Crawler" it renders the rull page HTML and saves that to the index. You'd have to create a custom index or create an event handler which would only index the "

0 votesVote for this answer Mark as a Correct answer

James Ison answered on March 23, 2020 20:34

I am using Pages. With the Standard analyzer.

0 votesVote for this answer Mark as a Correct answer

James Ison answered on March 23, 2020 21:14

OK I found the issue I believe. It was searching AnyWord in my code (webservice based search) I needed to use ExactPhrase. I believe it's fixed now.

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on March 24, 2020 14:14

just in case there is article Exclude certain elements from Smart Search index

0 votesVote for this answer Mark as a Correct answer

James Ison answered on March 24, 2020 17:16

Peter I saw that article but it's from 2014 and the code does not work in Kentico 11 12

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 24, 2020 17:19

The concept is the same, you just need to update the code to work with v11 and v12.

0 votesVote for this answer Mark as a Correct answer

James Ison answered on March 24, 2020 18:29

is it? I couldn't find some of the pieces once it was ported over.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 24, 2020 18:34

Yes, the concept is the same. You will have to dig into the API changes to find out what changed from version to version. Use this resource to find those changes.

https://devnet.kentico.com/documentation/api-changes/kentico-12

0 votesVote for this answer Mark as a Correct answer

James Ison answered on March 24, 2020 18:42

That's a pain the sample is for version 7.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 24, 2020 18:53

Sorry to say James but not everything is copy and paste and not every possible scenario is part of the documentation or API examples.

There are Kentico Partners (myself included) who do this for a living and could be hired to update the code. Another option is if you have specific areas which are erroring out in your code you could post those along with your current version and ask what could be updated.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.