PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 03-30-2004, 02:02 AM   #1
synnalagma
Green Mole
 
Join Date: Mar 2004
Posts: 22
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.
synnalagma is offline   Reply With Quote
Old 03-30-2004, 09:05 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 03-31-2004, 12:47 AM   #3
synnalagma
Green Mole
 
Join Date: Mar 2004
Posts: 22
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
synnalagma is offline   Reply With Quote
Old 04-01-2004, 12:52 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. There is no such option currently available.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic page indexing hame22 Troubleshooting 2 05-10-2005 11:07 AM
indexing for the 1st time but getting "duplicate of existing doc" msg with some files Morphea Troubleshooting 9 12-30-2004 04:03 PM
Not indexing anything besides main page CraniumDesigns Troubleshooting 2 12-16-2004 02:44 PM
Time out? Indexing does not seem to complete tomcowle Troubleshooting 2 08-10-2004 07:20 PM
is it real to inrease indexing time with web interface? zaartix How-to Forum 1 07-14-2004 09:13 PM


All times are GMT -8. The time now is 03:36 AM.


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