PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   Indexing one page at a time (http://www.phpdig.net/forum/showthread.php?t=745)

synnalagma 03-30-2004 01:02 AM

Indexing one page at a time
 
Hi,

I'm doing a website with a big document database. I want index this documents (mainly pdf).

I have an interface to add documents to the database and what I want is to index the document at this time.

The problem i have is that there's a time limit on the server. I have written a php script that link and indexed it but after some times it reindex all document wich take too much time.

So i think the solution would be to index or reindex documents only when I know that there are added or modified.

Is there a function I can use to index (or reindex) a specific document ?

Thanks for your help and sorry for my poor english.

Charter 03-30-2004 08:05 AM

Hi. Perhaps try the following.

In spider.php find:
PHP Code:

if ($mode != 'small') {
     
$query_tempspider "INSERT INTO ".PHPDIG_DB_PREFIX."tempspider (site_id,file,path) SELECT site_id,file,path FROM ".PHPDIG_DB_PREFIX."spider WHERE site_id=$site_id $andmore_tempspider";
     
mysql_query($query_tempspider,$id_connect);
}
else  {
     
$force_first_reindex 1;


and replace with:
PHP Code:

if ($mode != 'small') {
/*
     $query_tempspider = "INSERT INTO ".PHPDIG_DB_PREFIX."tempspider (site_id,file,path) SELECT site_id,file,path FROM ".PHPDIG_DB_PREFIX."spider WHERE site_id=$site_id $andmore_tempspider";
     mysql_query($query_tempspider,$id_connect);
*/
}
else  {
     
$force_first_reindex 1;


Remember to remove any "word" wrapping in the above code.

synnalagma 03-30-2004 11:47 PM

Thanks for your fast reply.

Just another question.

Is there a function I can use like
PHP Code:

spider($url

or
PHP Code:

spider($file

or
PHP Code:

startIndexing($url

or
PHP Code:

startIndexing($file

To automate indexing only one file.

Thanks in advance

Charter 03-31-2004 11:52 PM

Hi. There is no such option currently available.


All times are GMT -8. The time now is 06:35 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.