Lack of interest Exclude Forum from Search Index

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

nrep

Well-known member
I've got a site that I'm considering converting with an archived section that I'd like to exclude from the search index, but currently can't. If I include this part of the site, I'll require 20GB of space in xf_search_index for no benefit (I did a test import to see the impact).

It would be very handy to have an "exclude node from search index" option.

For the time being, does anyone have a workaround?
 
Upvote 6
This suggestion has been closed. Votes are no longer accepted.
For the time being, does anyone have a workaround?

Open
/library/XenForo/Search/DataHandler/Thread.php

under:
PHP:
if ($threadModel->isRedirect($data) || !$threadModel->isVisible($data))
        {
            return;
        }

add

PHP:
if ($data['node_id'] == X) // replace X with the id of your node (example: 1)
{
 return;
}

Open
/library/XenForo/Search/DataHandler/Post.php

under:
PHP:
$metadata['node'] = $thread['node_id']; // line 52

add

PHP:
if ($thread['node_id'] == X) // replace X with the id of your node (example: 1)
{
 return;
}
 
Thank you Daniel! Is that something that can be turned in to an addon, or would it always require file modification?
 
Good suggestion, I also need it. Should be available both for the default and advanced search.
A related topic are ignore functions. There are add-ons allowing users to exclude forums and topics from the "what`s new" views. Those should also be removed from the search results (if the user wants that).
 
I've got a site that I'm considering converting with an archived section that I'd like to exclude from the search index, but currently can't. If I include this part of the site, I'll require 20GB of space in xf_search_index for no benefit (I did a test import to see the impact).

It would be very handy to have an "exclude node from search index" option.

For the time being, does anyone have a workaround?

You should purchase the XenForo add-on Enhanced Search (aka ElasticSearch) for $45 dollars. That way you can easily include all your folders and searches will take just a fraction of a second.
 
You should purchase the XenForo add-on Enhanced Search (aka ElasticSearch) for $45 dollars. That way you can easily include all your folders and searches will take just a fraction of a second.

Will this save on disk space, in comparison to using the XF search table? As that's my main reason for wanting to do this :).
 
Indexed content needs to be saved somewhere - whether it's the database or elsewhere.

Essentially though, if your site is that large, standard MySQL search is going to struggle.
 
Will this save on disk space, in comparison to using the XF search table? As that's my main reason for wanting to do this :).

There are three main reasons to use Enhanced Search:

1) Search speed
2) The ability to use stemming searches
3) Time to rebuild the index

Disk space is a non-issue.
 
You should purchase the XenForo add-on Enhanced Search (aka ElasticSearch) for $45 dollars. That way you can easily include all your folders and searches will take just a fraction of a second.
Will I be able to Exclude Forums from the Search Index with enhanced search?
 
Good catch, Mike.

I was thinking of the Option (Include threads from this forum when users click "New Posts").
 
Top Bottom