Migrating/archive old content from previous wiki

Hi all,
We are going to migrate from MediaWiki to XWiki and the issue is that there is a lot of outdated pages that we don’t need in the new wiki, but we would like to have them available under some archiving section for further reference. Ideally those pages wouldn’t be indexable by the search engine.

How would you approach this?

Best.

Idea 1

One idea that comes to mind would be to move the old archived pages under a given root in the page tree and configure solr to exclude this tree root. The SOLR config page is at Main.SolrSearchConfig.

Note that this means the page will still be indexed since I don’t think we have a way to blacklist pages to index but they wouldn’t appear in searches.

Idea 2

Create a subwiki and put all the content there and disable search on that wiki. That’s much simpler IMO.

That is great Vincent!

Thanks!

Would the second option still allow me to disable searches on a subwiki but if I explicitly go to a subwiki I still can search through a sub wiki.
So what I mean is that I want to have a main wiki in which search only goes through the documentation in the wiki, but when I go to a sub wiki I would like to search only inside this subwiki.

Thanks.

Yes, you’ll be able to do this :slight_smile:

More precisely, the SOLR config can be found in Main.SolrSearchConfig. If you check out the content of this page you should find the following config:

wikisSearchableFromMainWiki

By default all subwikis are considered but you could remove this specific wiki from the list or create a white box list.

See also https://extensions.xwiki.org/xwiki/bin/view/Extension/Solr%20Search%20Application#HMiscellaneous

With something like:

#set ($__defaultSolrConfig = {
...
'wikisSearchableFromMainWiki': $wikisSearchableFromMainWiki,
...
})

#set ($discard = $__defaultSolrConfig.wikisSearchableFromMainWiki.remove('mywikitoremove'))

I haven’t tried this but it should work.

Thanks.
I guess to edit this page Main.SolrSearchConfig I have to build my own war file and maintain it myself right?

You could just edit it. But note that when you next upgrade XWiki, XWiki will try to merge your changes with the upstream changes and if there’s a conflict, it’ll tell you and ask you to resolve it.

Maybe @mflorea knows of a better way to configure this property without touching this page.

specially me deploying it through a container, so I guess every time it gets restarted I will loose the changes.

No, wiki pages are saved in the DB and the DB data is mounted through docker volumes (if you use the command line we suggest in the doc ofc). If you’re not doing that, then you loose everything when the DB container is removed, which is a bad idea :wink:

Right, I have it running in a network volume, so it is safe. The only thing is the upgrade process. Could this variable go into the xwiki.conf or properties file?

Thanks.