Collaboration diagram for SearchDoc:Public Member Functions | |
| __construct ($dbaccess= '', $fromid=0) | |
| onlyCount () | |
| getOriginalQuery () | |
| join ($jointure) | |
| count () | |
| reset () | |
| rewind () | |
| isExecuted () | |
| getFilters () | |
| search () | |
| getDocumentList () | |
| returnsOnly (array $returns) | |
| getReturnsFields () | |
| searchError () | |
| getError () | |
| setDebugMode ($debug=true) | |
| setRecursiveSearch ($recursiveMode=true, $level=2) | |
| getDebugInfo () | |
| getSearchInfo () | |
| setSlice ($slice) | |
| setOrder ($order, $orderbyLabel= '') | |
| useCollection ($dirid) | |
| setStart ($start) | |
| nextDoc () | |
| getNextDoc () | |
| getIds () | |
| addFilter ($filter, $args= '') | |
| addGeneralFilter ($keywords, $useSpell=false, $usePartial=false) | |
| setPertinenceOrder ($keyword= '') | |
| getHighLightText (Doc &$doc, $beginTag= '< b >', $endTag= '</b >', $limit=200, $wordMode=true) | |
| noViewControl () | |
| overrideViewControl () | |
| setObjectReturn ($returnobject=true) | |
| isObjectReturn () | |
| setValueReturn () | |
| excludeConfidential ($exclude=true) | |
| getQueries () | |
Static Public Member Functions | |
| static | getUserViewVector ($uid) |
| static | checkGeneralFilter ($keyword) |
| static | getGeneralFilter ($keywords, $useSpell=false, &$pertinenceOrder= '', &$highlightWords= '', $usePartial=false) |
| static | sqlcond (array $values, $column, $integer=false) |
Data Fields | |
| $fromid | |
| $dirid = 0 | |
| $recursiveSearch = false | |
| $folderRecursiveLevel = 2 | |
| $slice = "ALL" | |
| $start = 0 | |
| $filters = array() | |
| $only = false | |
| $distinct = false | |
| $orderby = 'title' | |
| $orderbyLabel = '' | |
| $trash = "" | |
| $latest = true | |
| $userid = 0 | |
Protected Member Functions | |
| countDocs () | |
| getNextDocument (Array $v) | |
| recursiveSearchInit () | |
Static Protected Member Functions | |
| static | testSpell ($word, $language="fr") |
Protected Attributes | |
| $originalDirId = 0 | |
| $returnsFields = array() | |
document searches
Definition at line 34 of file Class.SearchDoc.php.
| __construct | ( | $dbaccess = '', |
|
$fromid = 0 |
|||
| ) |
initialize with family
| string | $dbaccess | database coordinate |
| int | string | $fromid | family identifier to filter |
Definition at line 165 of file Class.SearchDoc.php.
Here is the call graph for this function:| addFilter | ( | $filter, | |
$args = '' |
|||
| ) |
add a condition in filters
| string | $filter | the filter string |
| string | $args | arguments of the filter string (arguments are escaped to avoid sql injection) |
Definition at line 783 of file Class.SearchDoc.php.
Here is the call graph for this function:add global filter based on keyword to match any attribute value available example : foo : filter all values with has the word foo foo bar : the word foo and the word bar are set in document attributes foo OR bar : the word foo or the word bar are set in a document attributes foo OR (bar AND zou) : more complex logical expression
| string | $keywords | |
| bool | $useSpell | use spell french checker |
| bool | $usePartial | if true each words are defined as partial characters |
| \Dcp\SearchDoc\Exception | SD0004 SD0003 SD0002 |
Definition at line 816 of file Class.SearchDoc.php.
Here is the call graph for this function:
|
static |
Verify if $keywords syntax is comptatible with a part of query for the moment verify only parenthesis balancing
| string | $keyword |
Definition at line 831 of file Class.SearchDoc.php.
| count | ( | ) |
count results search must be call before
Definition at line 346 of file Class.SearchDoc.php.
Here is the call graph for this function:
|
protected |
count returned document in sql select ressources
Definition at line 363 of file Class.SearchDoc.php.
Here is the call graph for this function:| excludeConfidential | ( | $exclude = true | ) |
add a filter to not return confidential document if current user cannot see it
| boolean | $exclude | set to true to exclude confidential |
Definition at line 1203 of file Class.SearchDoc.php.
Here is the call graph for this function:| getDebugInfo | ( | ) |
return debug info if debug mode enabled
Definition at line 600 of file Class.SearchDoc.php.
Here is the call graph for this function:| getDocumentList | ( | ) |
return document iterator to be used in loop
Definition at line 505 of file Class.SearchDoc.php.
| getError | ( | ) |
Return error message
Definition at line 560 of file Class.SearchDoc.php.
| getFilters | ( | ) |
Return sql filters used for request
Definition at line 409 of file Class.SearchDoc.php.
|
static |
get global filter
| string | $keywords | |
| bool | $useSpell | |
| string | $pertinenceOrder | return pertinence order |
| string | $highlightWords | return words to be use by SearchHighlight class |
| bool | $usePartial | if true each words are defined as partial characters |
| \Dcp\Lex\LexException | |
| \Dcp\SearchDoc\Exception |
Definition at line 877 of file Class.SearchDoc.php.
Here is the call graph for this function:| getHighLightText | ( | Doc & | $doc, |
$beginTag = '<b>', |
|||
$endTag = '</b>', |
|||
$limit = 200, |
|||
$wordMode = true |
|||
| ) |
return a document part where general filter term is found
| Doc | $doc | document to analyze |
| string | $beginTag | delimiter begin tag |
| string | $endTag | delimiter end tag |
| int | $limit | file size limit to analyze |
Definition at line 1077 of file Class.SearchDoc.php.
Here is the call graph for this function:| getIds | ( | ) |
after search return only document identifiers instead of complete document
Definition at line 731 of file Class.SearchDoc.php.
| getNextDoc | ( | ) |
can, be use in loop search must be call before
Definition at line 701 of file Class.SearchDoc.php.
Here is the call graph for this function:
|
protected |
Return an object document from array of values
| array | $v | the values of documents |
Definition at line 755 of file Class.SearchDoc.php.
Here is the call graph for this function:| getOriginalQuery | ( | ) |
return original sql query before test permissions
Definition at line 306 of file Class.SearchDoc.php.
Here is the call graph for this function:| getQueries | ( | ) |
Get the SQL queries that will be executed by the search() method
Definition at line 1240 of file Class.SearchDoc.php.
Here is the call graph for this function:| getReturnsFields | ( | ) |
| getSearchInfo | ( | ) |
return informations about query after search has been sent array indexes are : query, err, count, delay
Definition at line 611 of file Class.SearchDoc.php.
|
static |
return memberof to be used in profile filters
| $uid |
Definition at line 290 of file Class.SearchDoc.php.
Here is the call graph for this function:| isExecuted | ( | ) |
Verify if query is already sended to database
Definition at line 400 of file Class.SearchDoc.php.
| isObjectReturn | ( | ) |
Definition at line 1183 of file Class.SearchDoc.php.
| join | ( | $jointure | ) |
add join condition
| string | $jointure |
| Dcp\Exception |
Definition at line 327 of file Class.SearchDoc.php.
| nextDoc | ( | ) |
can, be use in loop search must be call before
Definition at line 686 of file Class.SearchDoc.php.
Here is the call graph for this function:| noViewControl | ( | ) |
no use access view control in filters
Definition at line 1156 of file Class.SearchDoc.php.
Here is the call graph for this function:| onlyCount | ( | ) |
Count results without returning data.
Note:
| Dcp\SearchDoc\Exception | |
| Dcp\Db\Exception |
Definition at line 229 of file Class.SearchDoc.php.
Here is the call graph for this function:| overrideViewControl | ( | ) |
no use access view control in filters
Definition at line 1166 of file Class.SearchDoc.php.
|
protected |
| reset | ( | ) |
reset results to use another search
Definition at line 376 of file Class.SearchDoc.php.
Here is the call graph for this function:| returnsOnly | ( | array | $returns | ) |
limit query to a subset of somes attributes
| array | $returns |
Definition at line 514 of file Class.SearchDoc.php.
Here is the call graph for this function:| rewind | ( | ) |
reset result offset use it to redo a document's iteration
Definition at line 389 of file Class.SearchDoc.php.
| search | ( | ) |
send search the query is sent to database
| Dcp\SearchDoc\Exception | |
| Dcp\Db\Exception |
Definition at line 427 of file Class.SearchDoc.php.
Here is the call graph for this function:| searchError | ( | ) |
return error message
Definition at line 551 of file Class.SearchDoc.php.
Here is the call graph for this function:| setDebugMode | ( | $debug = true | ) |
do the search in debug mode, you can after the search get infrrmation with getDebugIndo()
| boolean | $debug | set to true search in debug mode |
Definition at line 571 of file Class.SearchDoc.php.
Here is the call graph for this function:| setObjectReturn | ( | $returnobject = true | ) |
the return of search will be array of document's object
| bool | $returnobject | set to true to return object, false to return raw data |
Definition at line 1177 of file Class.SearchDoc.php.
| setOrder | ( | $order, | |
$orderbyLabel = '' |
|||
| ) |
use different order , default is title
| string | $order | the new order, empty means no order |
| string | $orderbyLabel | string of comma separated columns names on which the order should be performed on their label instead of their value (e.g. order enum by their label instead of their key) |
Definition at line 635 of file Class.SearchDoc.php.
| setPertinenceOrder | ( | $keyword = '' | ) |
add a order based on keyword consider how often the keyword terms appear in the document
| string | $keyword |
Definition at line 854 of file Class.SearchDoc.php.
Here is the call graph for this function:| setRecursiveSearch | ( | $recursiveMode = true, |
|
$level = 2 |
|||
| ) |
set recursive mode for folder searches can be use only if collection set if a static folder
| bool | $recursiveMode | set to true to use search in sub folders when collection is folder |
| int | $level | Indicate depth to inspect subfolders |
| Dcp\SearchDoc\Exception |
Definition at line 586 of file Class.SearchDoc.php.
| setSlice | ( | $slice | ) |
set maximum number of document to return
| int | $slice | the limit ('ALL' means no limit) |
Definition at line 622 of file Class.SearchDoc.php.
| setStart | ( | $start | ) |
set offset where start the result window
| int | $start | the offset (0 is the begin) |
Definition at line 668 of file Class.SearchDoc.php.
| setValueReturn | ( | ) |
the return of search will be array of values
Definition at line 1192 of file Class.SearchDoc.php.
Here is the call graph for this function:
|
static |
return where condition like : foo in ('x','y','z')
| array | $values | set of values |
| string | $column | database column name |
| bool | $integer | set to true if database column is numeric type |
Definition at line 1131 of file Class.SearchDoc.php.
Here is the call graph for this function:
|
staticprotected |
detect if word is a word of language if not the near word is set to do an OR condition
| string | $word | word to analyze |
| string | $language |
Definition at line 1104 of file Class.SearchDoc.php.
Here is the call graph for this function:| useCollection | ( | $dirid | ) |
use folder or search document to search within it
| int | $dirid | identifier of the collection |
Definition at line 649 of file Class.SearchDoc.php.
| $dirid = 0 |
folder identifier filter int
Definition at line 45 of file Class.SearchDoc.php.
| $distinct = false |
bool
Definition at line 80 of file Class.SearchDoc.php.
| $filters = array() |
sql filters array
Definition at line 70 of file Class.SearchDoc.php.
| $folderRecursiveLevel = 2 |
max recursive level int
Definition at line 55 of file Class.SearchDoc.php.
| $fromid |
family identifier filter string
Definition at line 40 of file Class.SearchDoc.php.
| $latest = true |
restriction to latest revision bool
Definition at line 100 of file Class.SearchDoc.php.
| $only = false |
search in sub-families set false if restriction to top family bool
Definition at line 75 of file Class.SearchDoc.php.
| $orderby = 'title' |
order of result : like sql order string
Definition at line 85 of file Class.SearchDoc.php.
| $orderbyLabel = '' |
order result by this attribute label/title string
Definition at line 90 of file Class.SearchDoc.php.
|
protected |
Definition at line 156 of file Class.SearchDoc.php.
| $recursiveSearch = false |
recursive search for folders boolean
Definition at line 50 of file Class.SearchDoc.php.
|
protected |
Definition at line 158 of file Class.SearchDoc.php.
| $slice = "ALL" |
number of results : set "ALL" if no limit int
Definition at line 60 of file Class.SearchDoc.php.
| $start = 0 |
index of results begins int
Definition at line 65 of file Class.SearchDoc.php.
| $trash = "" |
to search in trash : [no|also|only] string
Definition at line 95 of file Class.SearchDoc.php.
| $userid = 0 |
user identifier : set to current user by default int
Definition at line 105 of file Class.SearchDoc.php.