Forums / General / Exclude objects from indexing / Comment35131
Andrew Kelly
Tuesday 26 June 2007 3:00:41 am
Hi André,
thanks for such a quick reply.
Unfortunately, this isn't a viable alternative. The class is well defined and heavily used, and changing things would create a lot of unnecessary work. An analogy as an example of what I need would be this: "Folder objects" are used heavily throughout the site, and the title and description should always be indexed and findable through searches. However, 3 such folders are completely meaningless (and in fact stupid) when they show up in a search and should be removed from search results. That's not exactly the case here, but the analogy is completely analog. Just blocking those item through the search template seems a fine idea, until they are part of return set large enough to require pagination, which then messes everything up. The cleanest solution for me is to treat the items as non-existent in the context of a search.
Unless and until I'm informed of a better aproach, I think what I'm going to do is turn on delayed indexing, and then hack the reindexing script to skip items based on certain criteria.
So, I'm still open for a better solution on how NOT to index a normally indexable object, as well as a solution for removing individual objects which have already been indexed.
Andy