It is my understanding, correct me if I'm wrong, that with this module installed the core search indexing functions are still run for indexing. I would like to bypass this and not use the core search module for indexing or searching at all. Where in the code should I begin to look make indexing not use the core?

Initially, I figured I could simply modify the core search stuff to never touch the database, but I'm curious if there's a better way to do it.

(The core search indexer got very slow after the first couple hundred thousand nodes were indexed.)

Comments

singularo’s picture

The xapian module uses the data generated by the core indexing to present the results, so what you are talking about is not a small change, unfortunately.

So you can turn off the core module, and remove the code from the xapian library, but there would be more changes required on the presentation of the results that are non trivial.

If you make a patch, we'd certainly be interested in putting it in!

ksun’s picture

Ah, I don't really want to completely remove the dependency on the core, I just didn't want a number of expensive SQL queries running. The function search_update_totals is particularly heinous for instance.

For some reason, yesterday I was also under the impression that the original SQL queries run when you did a search. Since the do_search function is replaced with this module, I don't really see how that's possible, hehe.

Every time search_cron was run, it would take up to 3 minutes to complete the totals updates! It was crazy, so I didn't want it to be slamming the database with that function. (Brought the server to it's knees.)

I very much dislike modifying core files, so I found a workaround. Setting search_cron_limit to 0 made it so that anything that honored the search_cron_limit did not make any changes to the core search index, greatly speeding up cron runs whilst still leaving the search module enabled. Effectively disabling the core search's indexing processes, at least the most expensive ones. (No change to the totals, means the bulk of processing there is not done.)

Sorta hackish solution to my problem I admit, but it appears to work.

ksun’s picture

Status: Active » Closed (fixed)