BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
< ? php
/**
2014-08-29 12:15:33 -04:00
*
2012-06-26 10:49:07 -04:00
* ProcessMaker Open Source Edition
* Copyright ( C ) 2004 - 2012 Colosa Inc . 23
*
* This program is free software : you can redistribute it and / or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU Affero General Public License for more details .
*
* You should have received a copy of the GNU Affero General Public License
* along with this program . If not , see < http :// www . gnu . org / licenses />.
*
* For more information , contact Colosa Inc , 5304 Ventura Drive ,
* Delray Beach , FL , 33484 , USA , or email info @ colosa . com .
2014-08-29 12:15:33 -04:00
*
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
*/
2012-05-29 17:07:53 -04:00
2017-08-29 11:58:03 -04:00
require_once __DIR__ . '/../../../gulliver/system/class.g.php' ;
require_once __DIR__ . '/../../../bootstrap/autoload.php' ;
require_once __DIR__ . '/../../../bootstrap/app.php' ;
2012-05-30 17:47:28 -04:00
// check script parameters
2012-08-03 18:54:16 -04:00
// php reindex_solr.php workspacename [reindexall|reindexmissing|optimizeindex] [-skip 1005] [-reindextrunksize 1000]
2012-05-30 17:47:28 -04:00
// var_dump($argv);
2012-08-03 18:54:16 -04:00
//(count ($argv) == 4) || ((count ($argv) == 5) && ($argv [3] != '-skip'))
2017-08-14 16:13:46 -04:00
use ProcessMaker\Core\System ;
2012-08-03 18:54:16 -04:00
$commandLineSyntaxMsg = " Invalid command line arguments: \n " .
" syntax: " .
2015-12-18 11:19:01 -04:00
" php reindex_solr.php [workspace_name] [reindexall|reindexmissing|optimizeindex|reindexone|deleteindexone] [-skip { record_number}] [-reindextrunksize { trunk_size}] [-appuid { APP_UID}] \n " .
2012-08-03 18:54:16 -04:00
" Where \n " .
2014-08-29 12:15:33 -04:00
" reindexall : reindex all the database. \n " .
2015-12-18 11:19:01 -04:00
" reindexone : reindex one case. -appuid parameter is required. \n " .
" deleteindexone : delete one case from index. -appuid parameter is required. \n " .
2012-08-03 18:54:16 -04:00
" reindexmissing: reindex only the missing records stored in database. \n " .
" (records defined in APP_SOLR_QUEUE table are required) \n " .
" optimizeindex: optimize the changes in the search index. (used to get faster results) \n " .
" Optional Options: \n " .
" -skip { record_number}: used to skip a number of records. \n ex: -skip 10000 //skips the first 10000 records. \n " .
2014-08-29 12:15:33 -04:00
" -reindextrunksize { trunk_size}: specify the number of records sent to index each time. \n ex: -reindextrunksize 100 //(default = 1000) \n Reduce the trunk if using big documents, and memory is not enough. \n " ;
2012-08-03 18:54:16 -04:00
2014-08-29 12:15:33 -04:00
if ( ( count ( $argv ) < 3 ) || (( count ( $argv ) % 2 ) == 0 ) ||
2015-12-18 11:19:01 -04:00
( $argv [ 2 ] != 'reindexall' && $argv [ 2 ] != 'reindexmissing' && $argv [ 2 ] != 'optimizeindex' && $argv [ 2 ] != 'reindexone' && $argv [ 2 ] != 'deleteindexone' )) {
2012-08-03 18:54:16 -04:00
print $commandLineSyntaxMsg ;
2012-05-30 17:47:28 -04:00
die ();
2012-05-29 17:07:53 -04:00
}
2012-05-30 17:47:28 -04:00
$workspaceName = $argv [ 1 ];
$ScriptAction = $argv [ 2 ];
2012-08-03 18:54:16 -04:00
$SkipRecords = 0 ;
$TrunkSize = 1000 ;
2012-09-12 09:32:53 -04:00
$appUid = " " ;
2012-08-03 18:54:16 -04:00
//3 5 7
if ( count ( $argv ) > 3 ) {
for ( $argNumber = 3 ; $argNumber < count ( $argv ) ; $argNumber += 2 ) {
2012-09-12 09:32:53 -04:00
if (( $argv [ $argNumber ] == '-skip' || $argv [ $argNumber ] == '-reindextrunksize' || $argv [ $argNumber ] == '-appuid' )) {
2012-08-03 18:54:16 -04:00
//get options
if ( $argv [ $argNumber ] == '-skip' ) {
//use skip option
$SkipRecords = intval ( $argv [ $argNumber + 1 ]);
}
if ( $argv [ $argNumber ] == '-reindextrunksize' ) {
//use skip option
$TrunkSize = intval ( $argv [ $argNumber + 1 ]);
2012-09-12 09:32:53 -04:00
}
if ( $argv [ $argNumber ] == '-appuid' ) {
//use skip option
$appUid = $argv [ $argNumber + 1 ];
2014-08-29 12:15:33 -04:00
}
2012-08-03 18:54:16 -04:00
}
else {
print $commandLineSyntaxMsg ;
die ();
}
}
}
2013-06-05 12:28:48 -04:00
$debug = 1 ;
2012-05-29 17:07:53 -04:00
2012-05-30 17:47:28 -04:00
ini_set ( 'display_errors' , 1 );
2013-06-05 12:28:48 -04:00
//error_reporting (E_ALL);
2012-05-30 17:47:28 -04:00
ini_set ( 'memory_limit' , '256M' ); // set enough memory for the script
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
2013-06-05 12:28:48 -04:00
$e_all = defined ( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL ;
$e_all = defined ( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all ;
$e_all = $debug ? $e_all : $e_all & ~ E_NOTICE ;
ini_set ( 'error_reporting' , $e_all );
2012-05-30 17:47:28 -04:00
if ( ! defined ( 'SYS_LANG' )) {
define ( 'SYS_LANG' , 'en' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-30 17:47:28 -04:00
if ( ! defined ( 'PATH_HOME' )) {
if ( ! defined ( 'PATH_SEP' )) {
define ( 'PATH_SEP' , ( substr ( PHP_OS , 0 , 3 ) == 'WIN' ) ? '\\' : '/' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-30 17:47:28 -04:00
$docuroot = explode ( PATH_SEP , str_replace ( 'engine' . PATH_SEP . 'methods' . PATH_SEP . 'services' , '' , dirname ( __FILE__ )));
array_pop ( $docuroot );
array_pop ( $docuroot );
$pathhome = implode ( PATH_SEP , $docuroot ) . PATH_SEP ;
2012-05-15 17:41:12 -04:00
// try to find automatically the trunk directory where are placed the RBAC and
// Gulliver directories
// in a normal installation you don't need to change it.
2012-05-30 17:47:28 -04:00
array_pop ( $docuroot );
$pathTrunk = implode ( PATH_SEP , $docuroot ) . PATH_SEP ;
array_pop ( $docuroot );
$pathOutTrunk = implode ( PATH_SEP , $docuroot ) . PATH_SEP ;
2012-05-15 17:41:12 -04:00
// to do: check previous algorith for Windows $pathTrunk = "c:/home/";
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
define ( 'PATH_HOME' , $pathhome );
define ( 'PATH_TRUNK' , $pathTrunk );
define ( 'PATH_OUTTRUNK' , $pathOutTrunk );
2014-07-07 09:57:48 -04:00
define ( 'PATH_CLASSES' , PATH_HOME . " engine " . PATH_SEP . " classes " . PATH_SEP );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
require_once ( PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php' );
}
print " PATH_HOME: " . PATH_HOME . " \n " ;
print " PATH_DB: " . PATH_DB . " \n " ;
print " PATH_CORE: " . PATH_CORE . " \n " ;
2012-05-15 17:41:12 -04:00
// define the site name (instance name)
2012-05-30 17:47:28 -04:00
if ( ! defined ( 'SYS_SYS' )) {
2012-05-29 17:07:53 -04:00
$sObject = $workspaceName ;
2012-05-15 17:41:12 -04:00
$sNow = '' ; // $argv[2];
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
$sFilter = '' ;
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
for ( $i = 3 ; $i < count ( $argv ); $i ++ ) {
2012-05-15 17:41:12 -04:00
$sFilter .= ' ' . $argv [ $i ];
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
$oDirectory = dir ( PATH_DB );
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
if ( is_dir ( PATH_DB . $sObject )) {
saveLog ( 'main' , 'action' , " checking folder " . PATH_DB . $sObject );
if ( file_exists ( PATH_DB . $sObject . PATH_SEP . 'db.php' )) {
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
define ( 'SYS_SYS' , $sObject );
2017-10-06 17:21:21 -04:00
config ([ " sys_sys " => $sObject ]);
2014-08-29 12:15:33 -04:00
2012-05-15 17:41:12 -04:00
// ****************************************
// read initialize file
2013-06-05 12:28:48 -04:00
require_once PATH_HOME . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'class.system.php' ;
2017-10-06 17:21:21 -04:00
$config = System :: getSystemConfiguration ( '' , '' , config ( " sys_sys " ));
2012-05-30 17:47:28 -04:00
define ( 'MEMCACHED_ENABLED' , $config [ 'memcached' ]);
define ( 'MEMCACHED_SERVER' , $config [ 'memcached_server' ]);
define ( 'TIME_ZONE' , $config [ 'time_zone' ]);
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
date_default_timezone_set ( TIME_ZONE );
2017-02-15 16:26:02 +00:00
2015-04-28 15:48:30 -04:00
$filter = new InputFilter ();
$TIME_ZONE = $filter -> xssFilterHard ( TIME_ZONE );
$MEMCACHED_ENABLED = $filter -> xssFilterHard ( MEMCACHED_ENABLED );
$MEMCACHED_SERVER = $filter -> xssFilterHard ( MEMCACHED_SERVER );
print " TIME_ZONE: " . $TIME_ZONE . " \n " ;
print " MEMCACHED_ENABLED: " . $MEMCACHED_ENABLED . " \n " ;
print " MEMCACHED_SERVER: " . $MEMCACHED_SERVER . " \n " ;
2012-05-15 17:41:12 -04:00
// ****************************************
2014-08-29 12:15:33 -04:00
2013-06-05 12:28:48 -04:00
include_once ( PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php' );
include_once ( PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php' );
2014-08-29 12:15:33 -04:00
2012-05-15 17:41:12 -04:00
// ***************** PM Paths DATA **************************
2017-10-06 17:21:21 -04:00
define ( 'PATH_DATA_SITE' , PATH_DATA . 'sites/' . config ( " sys_sys " ) . '/' );
2012-05-30 17:47:28 -04:00
define ( 'PATH_DOCUMENT' , PATH_DATA_SITE . 'files/' );
define ( 'PATH_DATA_MAILTEMPLATES' , PATH_DATA_SITE . 'mailTemplates/' );
define ( 'PATH_DATA_PUBLIC' , PATH_DATA_SITE . 'public/' );
define ( 'PATH_DATA_REPORTS' , PATH_DATA_SITE . 'reports/' );
define ( 'PATH_DYNAFORM' , PATH_DATA_SITE . 'xmlForms/' );
define ( 'PATH_IMAGES_ENVIRONMENT_FILES' , PATH_DATA_SITE . 'usersFiles' . PATH_SEP );
define ( 'PATH_IMAGES_ENVIRONMENT_USERS' , PATH_DATA_SITE . 'usersPhotographies' . PATH_SEP );
2014-08-29 12:15:33 -04:00
2012-05-15 17:41:12 -04:00
// server info file
2012-05-30 17:47:28 -04:00
if ( is_file ( PATH_DATA_SITE . PATH_SEP . '.server_info' )) {
$SERVER_INFO = file_get_contents ( PATH_DATA_SITE . PATH_SEP . '.server_info' );
$SERVER_INFO = unserialize ( $SERVER_INFO );
2012-05-15 17:41:12 -04:00
// print_r($SERVER_INFO);
2012-05-30 17:47:28 -04:00
define ( 'SERVER_NAME' , $SERVER_INFO [ 'SERVER_NAME' ]);
define ( 'SERVER_PORT' , $SERVER_INFO [ 'SERVER_PORT' ]);
2012-05-15 17:41:12 -04:00
}
else {
2012-05-30 17:47:28 -04:00
eprintln ( " WARNING! No server info found! " , 'red' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2014-08-29 12:15:33 -04:00
2012-05-15 17:41:12 -04:00
// read db configuration
2012-05-30 17:47:28 -04:00
$sContent = file_get_contents ( PATH_DB . $sObject . PATH_SEP . 'db.php' );
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
$sContent = str_replace ( '<?php' , '' , $sContent );
$sContent = str_replace ( '<?' , '' , $sContent );
$sContent = str_replace ( '?>' , '' , $sContent );
$sContent = str_replace ( 'define' , '' , $sContent );
$sContent = str_replace ( " (' " , " $ " , $sContent );
$sContent = str_replace ( " ', " , '=' , $sContent );
$sContent = str_replace ( " ); " , ';' , $sContent );
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
eval ( $sContent );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
$dsn = $DB_ADAPTER . '://' . $DB_USER . ':' . $DB_PASS . '@' . $DB_HOST . '/' . $DB_NAME ;
$dsnRbac = $DB_ADAPTER . '://' . $DB_RBAC_USER . ':' . $DB_RBAC_PASS . '@' . $DB_RBAC_HOST . '/' . $DB_RBAC_NAME ;
$dsnRp = $DB_ADAPTER . '://' . $DB_REPORT_USER . ':' . $DB_REPORT_PASS . '@' . $DB_REPORT_HOST . '/' . $DB_REPORT_NAME ;
switch ( $DB_ADAPTER ) {
2012-05-15 17:41:12 -04:00
case 'mysql' :
$dsn .= '?encoding=utf8' ;
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
$dsnRbac .= '?encoding=utf8' ;
2012-05-15 17:41:12 -04:00
break ;
case 'mssql' :
// $dsn .= '?sendStringAsUnicode=false';
// $dsnRbac .= '?sendStringAsUnicode=false';
break ;
default :
break ;
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-15 17:41:12 -04:00
// initialize db
$pro [ 'datasources' ] [ 'workflow' ] [ 'connection' ] = $dsn ;
$pro [ 'datasources' ] [ 'workflow' ] [ 'adapter' ] = $DB_ADAPTER ;
$pro [ 'datasources' ] [ 'rbac' ] [ 'connection' ] = $dsnRbac ;
$pro [ 'datasources' ] [ 'rbac' ] [ 'adapter' ] = $DB_ADAPTER ;
$pro [ 'datasources' ] [ 'rp' ] [ 'connection' ] = $dsnRp ;
$pro [ 'datasources' ] [ 'rp' ] [ 'adapter' ] = $DB_ADAPTER ;
// $pro['datasources']['dbarray']['connection'] =
// 'dbarray://user:pass@localhost/pm_os';
// $pro['datasources']['dbarray']['adapter'] = 'dbarray';
2012-05-30 17:47:28 -04:00
$oFile = fopen ( PATH_CORE . 'config/_databases_.php' , 'w' );
fwrite ( $oFile , '<?php global $pro;return $pro; ?>' );
fclose ( $oFile );
Propel :: init ( PATH_CORE . 'config/_databases_.php' );
2012-05-15 17:41:12 -04:00
// Creole::registerDriver('dbarray', 'creole.contrib.DBArrayConnection');
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
eprintln ( " Processing workspace: " . $sObject , 'green' );
2012-05-15 17:41:12 -04:00
try {
processWorkspace ();
}
2012-05-30 17:47:28 -04:00
catch ( Exception $e ) {
2016-07-27 16:37:21 -04:00
$token = strtotime ( " now " );
PMException :: registerErrorLog ( $e , $token );
G :: outRes ( G :: LoadTranslation ( " ID_EXCEPTION_LOG_INTERFAZ " , array ( $token )) );
2012-06-26 10:49:07 -04:00
eprintln ( " Problem in workspace: " . $sObject . ' it was omitted.' , 'red' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-15 17:41:12 -04:00
eprintln ();
2012-05-30 17:47:28 -04:00
unlink ( PATH_CORE . 'config/_databases_.php' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
}
2012-05-15 17:41:12 -04:00
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
else {
2012-05-15 17:41:12 -04:00
processWorkspace ();
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-30 17:47:28 -04:00
function processWorkspace ()
{
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
global $sLastExecution ;
2012-05-29 17:07:53 -04:00
global $ScriptAction ;
2012-08-03 18:54:16 -04:00
global $SkipRecords ;
global $TrunkSize ;
2012-09-12 09:32:53 -04:00
global $appUid ;
2014-08-29 12:15:33 -04:00
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
try {
2014-08-29 12:15:33 -04:00
2017-10-06 17:21:21 -04:00
if (( $solrConf = System :: solrEnv ( config ( " sys_sys " ))) !== false ) {
2012-05-29 17:07:53 -04:00
print " Solr Configuration file: " . PATH_DATA_SITE . " env.ini \n " ;
print " solr_enabled: " . $solrConf [ 'solr_enabled' ] . " \n " ;
print " solr_host: " . $solrConf [ 'solr_host' ] . " \n " ;
print " solr_instance: " . $solrConf [ 'solr_instance' ] . " \n " ;
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
$oAppSolr = new AppSolr ( $solrConf [ 'solr_enabled' ], $solrConf [ 'solr_host' ], $solrConf [ 'solr_instance' ]);
if ( $ScriptAction == " reindexall " ) {
2012-08-03 18:54:16 -04:00
$oAppSolr -> reindexAllApplications ( $SkipRecords , $TrunkSize );
2012-05-29 17:07:53 -04:00
}
2012-05-30 17:47:28 -04:00
if ( $ScriptAction == " reindexmissing " ) {
$oAppSolr -> synchronizePendingApplications ();
2012-05-29 17:07:53 -04:00
}
2012-08-03 18:54:16 -04:00
if ( $ScriptAction == " optimizeindex " ) {
$oAppSolr -> optimizeSearchIndex ();
}
2012-09-12 09:32:53 -04:00
if ( $ScriptAction == " reindexone " ){
if ( $appUid == " " ){
print " Missing -appuid parameter. please complete it with this option. \n " ;
}
2013-06-05 12:28:48 -04:00
$oAppSolr -> updateApplicationSearchIndex ( $appUid , false );
2012-09-12 09:32:53 -04:00
}
2015-12-18 11:19:01 -04:00
if ( $ScriptAction == " deleteindexone " ){
if ( $appUid == " " ){
print " Missing -appuid parameter. please complete it with this option. \n " ;
}
$oAppSolr -> deleteApplicationSearchIndex ( $appUid , false );
}
2012-05-15 17:41:12 -04:00
}
else {
2012-05-29 17:07:53 -04:00
print " Incomplete Solr configuration. See configuration file: " . PATH_DATA_SITE . " env.ini " ;
2012-05-15 17:41:12 -04:00
}
2014-08-29 12:15:33 -04:00
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-30 17:47:28 -04:00
catch ( Exception $oError ) {
saveLog ( " main " , " error " , " Error processing workspace : " . $oError -> getMessage () . " \n " );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
}
2012-05-30 17:47:28 -04:00
function saveLog ( $sSource , $sType , $sDescription )
{
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
try {
global $isDebug ;
2012-05-15 17:41:12 -04:00
if ( $isDebug )
2012-05-30 17:47:28 -04:00
print date ( 'H:i:s' ) . " ( $sSource ) $sType $sDescription <br> \n " ;
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
G :: verifyPath ( PATH_DATA . 'log' . PATH_SEP , true );
2014-10-03 11:09:45 -04:00
$message = '(' . $sSource . ') ' . $sDescription ;
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
if ( $sType == 'action' ) {
2013-11-22 17:05:10 -04:00
G :: log ( $message , PATH_DATA );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
else {
2013-11-22 17:05:10 -04:00
G :: log ( $message , PATH_DATA , 'cronError.log' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
}
2012-05-30 17:47:28 -04:00
catch ( Exception $oError ) {
2012-05-15 17:41:12 -04:00
// CONTINUE
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
}
2012-05-30 17:47:28 -04:00
function setExecutionMessage ( $m )
{
$len = strlen ( $m );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
$linesize = 60 ;
$rOffset = $linesize - $len ;
2014-08-29 12:15:33 -04:00
2012-05-30 17:47:28 -04:00
eprint ( " * $m " );
for ( $i = 0 ; $i < $rOffset ; $i ++ )
eprint ( '.' );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}
2012-05-30 17:47:28 -04:00
function setExecutionResultMessage ( $m , $t = '' )
{
2012-05-15 17:41:12 -04:00
$c = 'green' ;
if ( $t == 'error' )
$c = 'red' ;
if ( $t == 'info' )
$c = 'yellow' ;
2012-05-30 17:47:28 -04:00
eprintln ( " [ $m ] " , $c );
BUG 0000 herbert> SOLR implementation in PMOS2
Solr support in PMOS2 includes:
Functionality:
- Implementation of Home views (Inbox, Draft, Participated, Unassigned). The views return fast results.
- Include read, unread, all, and process filter in inbox View.
- Include process filter in draft view.
- Include started by me, completed by me, all, process, and status filter in participated view.
- Include process filter in unassigned view.
- Improved search functionality (search in user defined variables): Use the following syntax to search in process (user defined) variables. {variable_name}:{search_word} ex1:"causal:20*" where causal is the variable defined by the user.
+ Use of wildcards in search: Use * as wildcard at the begin or end of word
+ Multiple conditions in search: Separate multiple conditions by space ex2:"Materiales causal:20*" means that we are searching for the word Materiales and the causal that begin with 20.
+ Search in dates (interval ): Format=> {variable_date}:[yyyy-mm-dd TO yyyy-mm-dd]
Local date not UTC date required
ex: FechaRegistro:[2011-04-15 TO 2011-04-30] //registros con fecha entre el 2011-04-15 y el 2011-04-30.
+ we can use the wildcard *:
ex: FechaRegistro:[* TO 2011-04-30] //registros con fecha menor o igual a 2011-04-30.
FechaRegistro:[2011-04-15 TO *] //registros con fecha mayor o igual a 2011-04-15.
+ Search of exact phrases. format: {variable}:"frase a buscar"
ex: Cliente:"Jesus Marin"
- Application update function.
+ The function is called every time a change is detected in the application's data including the related delegations.
- Use of cache to improve performance
Not included:
- Order of task, sent by, and due date columns.
Pending:
- Advanced search view using faceted lists.
2012-05-15 10:56:48 -04:00
}