2

I want to perform search items indexing on the local system . Due to high number of items and And slowing down the server

Can I do something like this , then I upload the result to the DB? Without completely erasing the previous database.just replacing drupal's index.

2
  • Have you looked into using solr? That would remove the burden of indexing from your database layer entirely, and you can set up various indexing regimes. You can also host the solr instance on a separate server.
    – Ollie
    Commented Nov 26, 2014 at 11:27
  • Are you using the Search API module, or just built-in search? Either way, you could (1) sync to local (2) re index (3) mysqldump just the search tables to a file on the server (4) import those. Of course if too much changes on the server in the time it takes to index, this won't work. Commented Nov 26, 2014 at 13:03

1 Answer 1

0

The suggestions in the comments are good, specially using solr.

But in your case you can index the whole data locally, and dump these three tables: search_dataset, search_index, search_total and then import it on the server.

3
  • 1
    This would work, but note that dev server should have all the content to index, which makes it not a dev server. Besides, indexing in the live server, in most sites, is a painless process and new contents get indexed a few minutes later automatically during the cron.
    – AKS
    Commented Nov 27, 2014 at 16:59
  • True, but if the number of items is high enough, say millions, and they need the content to be indexed asap, then it would take a long time for all the content to be indexed. The real problem is that visitors have to wait a few minutes before the first page load for the cron to finish. And if the user stops the page load or refreshes, the cron would register as run, but the job not so much.
    – Milad.N
    Commented Nov 27, 2014 at 17:06
  • 1
    drush search-reindex --immediate --verbose and all nodes are indexed ASAP.
    – AKS
    Commented Nov 27, 2014 at 17:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.