<cfsearch>

Executes searches against data indexed

This tag cannot have a body.

This tag is also supported within <cfscript>

Attribute Description
language
string, optional

Deprecated. This attribute is now ignored and the language of the collection is used to perform the search.

previouscriteria
string, optional

The name of a result set from an existing set of search results. Lucene searches the result set for criteria without regard to the previous search score or rank. Use this attribute to implement searching within result sets.

suggestions
string, optional

Specifies whether Lucene returns spelling suggestions for possibly misspelled words.

status
string, optional

Specifies the name of the structure variable into which Lucee places search information, including alternative criteria suggestions (spelling corrections).

startrow
number, optional

Specifies the first row number to be retrieved. Default is 1.

criteria
string, optional

Specifies the criteria for the search following the syntactic rules specified by type.

collection
string, required

The logical collection name that is the target of the search operation or an external collection with fully qualified path.

categorytree
string, optional

The location in a hierarchical category tree at which to start the search. Lucee searches at and below this level. If specified, and the collection does not have categories enabled, Lucee throws an exception. Can be used in addition to category attribute.

external
boolean, optional

This attribute has been deprecated and is non-functional.

contextbytes
number, optional

The maximum number of bytes Lucene returns in the context summary. Default: 300

category
string, optional

A list of categories, separated by commas, to which the search is limited. If specified, and the collection does not have categories enabled, Lucee

        throws an exception.
maxrows
number, optional

Specifies the maximum number of entries for index queries. If omitted, all rows are returned.

name
string, required

A name for the search query.

type
string, optional

Specifies the criteria type for the search.

contexthighlightbegin
string, optional

The HTML to prepend to search terms in the context summary. Use this attribute in conjunction with contextHighlightEnd to highlight search terms in the context summary. Default:

contextpassages
number, optional

The number of passages/sentences Lucene returns in the context summary (that is, the context column of the results). Default: 3

contexthighlightend
string, optional

The HTML to prepend to search terms in the context summary. Use this attribute in conjunction with contextHighlightEnd to highlight search terms in the context summary. Default:

<cfsearch
    [language=string]
    [previouscriteria=string]
    [suggestions=string]
    [status=string]
    [startrow=number]
    [criteria=string]
    collection=string
    [categorytree=string]
    [external=boolean]
    [contextbytes=number]
    [category=string]
    [maxrows=number]
    name=string
    [type=string]
    [contexthighlightbegin=string]
    [contextpassages=number]
    [contexthighlightend=string]
>

Examples

There are currently no examples for this tag.

See also