CollectionSearch()
Performs searches against the registered collection using the Apache Lucene internal engine
Usage
QUERY = CollectionSearch(
collection,
criteria,
type,
minscore,
maxrows,
startrow,
category,
categorytree,
contextpassages,
contextbytes,
contexthighlightstart,
contexthighlightend,
contents,
uniquecolumn,
allowleadingwildcard
)
Argument | Summary |
---|---|
collection | the name of one or more collections to perform the search. Multiple collections are delimited by a comma |
criteria | the search to perform |
type | the type of search; 'simple' or 'explicit'. The simple search will OR all the tokens in the crteria where as the explicit will use the criteria as a Lucene search string. Defaults to 'simple' [optional] |
minscore | minimum score of the document to be included in the result query. A value between 0.0 and 10.0 is required. Defaults to 0 (all results that match) [optional] |
maxrows | maximum number of rows to return back in this result. Defaults to all [optional] |
startrow | the start of the row in the search results to start from. Useful for paging through results. Defaults to 1 [optional] |
category | the list of categories to which the search is matched against [optional] |
categorytree | the hierachy to which to search against. Usually in the form of 'a/b/c/', which would search all results that where in the 'a/b/c/' start prefix [optional] |
contextpassages | the number of contextual passages that will be returned. Defaults to 0 which disables the feature [optional] |
contextbytes | the maximum size of the contextual passage [optional] |
contexthighlightstart | the start marker for the contextual piece [optional] |
contexthighlightend | the end marker for the contextual piece [optional] |
contents | flag to determine if the CONTENT column is return; If you are storing the full body, this lets you return that full body or not in the query. defaults to true [optional] |
uniquecolumn | name of the column that will be checked to see if it is unique before adding to the result query [optional] |
allowleadingwildcard | set to true to allow the criteria to begin with a wildcard. Doing so will result in slow execution over a large index [optional] |
Calling
Supports named-parameter calling allowing you to use the function like:
CollectionSearch( collection=?, criteria=?, type=?, minscore=?, maxrows=?, startrow=?, category=?, categorytree=?, contextpassages=?, contextbytes=?, contexthighlightstart=?, contexthighlightend=?, contents=?, uniquecolumn=?, allowleadingwildcard=? );
Supports passing parameters as a structure using ArgumentCollection:
CollectionSearch( ArgumentCollection={ collection : ?, criteria : ?, type : ?, minscore : ?, maxrows : ?, startrow : ?, category : ?, categorytree : ?, contextpassages : ?, contextbytes : ?, contexthighlightstart : ?, contexthighlightend : ?, contents : ?, uniquecolumn : ?, allowleadingwildcard : ? } );
Extra
For more information on searching please visit Searching within OpenBD CFML