Try our conversational search powered by Generative AI!

Indexing pages

Vote:
 

Hello colleagues,

I want to add the ability for 'content editors' to forbid indexing certain pages. (bool property on page)

How to make a page with specific data don't fall in the index?

I know how can't index the page on its type, but with properties I don't found a good solution.

I hope for your help

Thanks

#87672
Jun 19, 2014 10:34
Vote:
 

We do this in our solution. In global application start I have some wiring for what Rind should index and not.

This line works on a bool property:

// Do not index pages with HideFromSearch set

ContentIndexer.Instance.Conventions.ForInstancesOf<BasePageData>().ShouldIndex(x => !x.HideFromSearch);

#87704
Jun 19, 2014 17:06
Vote:
 

Hi Petter,

I tried this solution, but it only works after re-indexing (run job in admin mode).

Is it possible to somehow make the page is removed from the index after it publishing event?

PS I use the following code to search

SearchClient.Instance
.UnifiedSearchFor(SearchText)
.FilterByExactTypes(PageTypesForFacet)
.Take(1000)
.GetResult();

Thanks

#87717
Jun 20, 2014 7:44
Vote:
 

Ok I had that problemt too before =)

Henrik gives a nice fix to the issue in this thread.

http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=76834&epslanguage=en

#87748
Jun 22, 2014 18:00
Vote:
 

Thank you Petter

#87782
Edited, Jun 23, 2014 15:03
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.