search
[ class tree: search ] [ index: search ] [ all elements ]

Procedural File: cmd_line_reindex.php

Source Location: /search/cmd_line_reindex.php



Page Details:

Command Line Site Reindex Created with stub from jht001 and help from KainX (Thanks to you both)

This script is designed to be called from the command line to allow you to reindex all the liberty content on your site.

cmd_line_reindex takes up to three optional arguments Argument 1 - ContentType This is the type of content you wish to reindex using the content type guids "pages" will attempt to reindex all content Content Type Guids allowed (so far): bitarticle, bitblogpost, bitcomment, bitpage, bituser, fisheyegallery, fisheyeimage

Argument 2 - Silent Silent = no messages displayed to the console

Argument 3 - UnindexedOnly UnindexedOnly = Only index content that isn't already in the index. This function is useful for sites that import data from other sites. Note: This function employs sub-selects in the SQL. This will break MySQL 3.x - however works fine on MySQL 4.x, Postgres, Firebird and MSSQL.

Examples:

php cmd_line_reindex // reindexes all content on your site with messages php cmd_line_reindex pages silent unindexedonly // Indexes entire site, no messages - and only content not in the index yet php cmd_line_reindex bitarticle unindexedonly // Indexes only articles that haven't been indexed yet

I have run the "unindexedonly" option several times in a row and was told it attempted to reindex 20 pieces of content each time.




Tags:

filesource:  Source Code for this file


Includes:

require_once('../kernel/setup_inc.php') [line 47]
Define Server Variables so script won't puke on command line

require_once(SEARCH_PKG_PATH.'refresh_functions.php') [line 49]
require_once(LibertyBase.php) [line 48]






microtime_float [line 87]

void microtime_float( )



[ Top ]



Documentation generated on Wed, 29 Jul 2015 13:56:14 +0000 by phpDocumentor 1.5.0-lsces