Smart search index - exclude linked pages

Evine Beursken asked on December 1, 2016 14:10

I have created a "smart search index" and use a "smart search dialog". When searching I noticed that pages that are made and linked somewhere else (by adding: Link an existing page) are both shown.

I want to exclude the linked pages. How do I do this? There is no such option in the smart search app.

Thanks in advance!

Correct Answer

Peter Mogilnitski answered on December 5, 2016 17:37

Evine,

The condition does work. I've tested it. It is much easier and maintainable to add the search condition instead of mass updating etc.

  • First of all make sure that your index is updated. If not - rebuild it.
  • You can use Lucene Index Toolbox to look inside your index, make sure that your index has nodelinkednodeid.
  • To test it in an easy way - reverse it (i.e. +nodelinkednodeid:[0 TO 9])- you will get only linked nodes.
1 votesVote for this answer Unmark Correct answer

Recent Answers


Anton Grekhovodov answered on December 1, 2016 14:38

Hi Evine,

Smart Search dialog isn't smart enough. You can use Smart Search Dialog with Results because it has some conditions for searching.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 1, 2016 15:34

You can't exclude them in a mass setting or query. You will have to set the properties for that particular page or linked page under Properties > Navigation > Search & SEO > Exclude from search = checked.

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on December 1, 2016 15:58 (last edited on December 1, 2016 16:06)

There is "nodelinkednodeid" field in the index. For linked pages this will contain some integer value. You have to put search condition into your smart "search dialog with results" web part excluding pages where nodelinkednodeid equals some integer i.e -nodelinkednodeid:[0 TO 9]

1 votesVote for this answer Mark as a Correct answer

Anton Grekhovodov answered on December 1, 2016 16:40

I usually use another condition which excludes all linked pages: (*:* NOT nodelinkednodeid:[0 TO 9999])

0 votesVote for this answer Mark as a Correct answer

Evine Beursken answered on December 5, 2016 10:40

Thanks for the responses! Adding such a search condition does unfortunately not work.

Brenden, can you explain why such a search condition does not work?

0 votesVote for this answer Mark as a Correct answer

Evine Beursken answered on December 5, 2016 10:43

Excluding the linked page as Brenden said also updates the original page and thereby excludes that one as well. Any other ideas?

0 votesVote for this answer Mark as a Correct answer

Evine Beursken answered on December 7, 2016 16:05 (last edited on December 7, 2016 16:07)

+nodelinkednodeid:[0 TO 9999] worked for me.

By using SQL server management studio, I discovered the numbers were a lot higher than 9 (which I used in my first statement). I would rather have checked whether the nodelinkednodeID is NULL. This would have been a much safer check.

0 votesVote for this answer Mark as a Correct answer

Evine Beursken answered on December 12, 2016 09:10

See http://johnnycode.com/2014/08/01/exclude-kentico-linked-documents-from-smart-search-results/ for more information about excluding linked documents in smart search

0 votesVote for this answer Mark as a Correct answer

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