cfsearch

Searches Verity collections using CFML or K2Server,
whichever search engine a collection is registered by.
(CFML can also search collections that have not been
registered, with the cfcollection tag.)

A collection must be created and indexed before this tag can
return search results.

 <cfsearch name="" collection="">

 cfsearch(name="", collection="");

cfsearch Attribute Reference

name
Required

Name of the search query.

collection
Required

One or more collection names. You can specify more
than one collection unless you are performing a
category search (that is, specifying category or
categoryTree).

One or more collection names. You can specify more
than one collection unless you are performing a
category search (that is, specifying category or
categoryTree).

category

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

throws an exception.

categorytree

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

status

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

type
Default: simple

Used to specify the parser that Verity/SOLR uses to process
the criteria. Values:
  • simple
  • explicit
  • internet
  • internet_basic
  • natural
  • standard
  • dismax

criteria

Search criteria. Follows the syntax rules of the type
attribute. If you pass a mixed-case entry in this attribute,
the search is case-sensitive. If you pass all uppercase or
all lowercase, the search is case-insensitive. Follow
Verity syntax and delimiter character rules; see Using
Verity Search Expressions in Developing CFML MX
Applications.

maxrows
Default: all

Maximum number of rows to return in query results.
Default: all

startrow
Default: 1

First row number to get.
Default: 1

suggestions
Default: never

Specifies whether Verity/SOLR returns spelling suggestions
for possibly misspelled words. Values:
  • always
  • never
  • 5
  • 10

contextPassages
Default: 3

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

contextBytes
Default: 300

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

contextHighlightBegin
Default: <b>

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: Values:
  • <b>
  • <strong>
  • <span class="highlight">

contextHighlightEnd
Default: </b>

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:
Values:
  • </b>
  • </strong>
  • </span>

previousCriteria

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

language

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

Fork me on GitHub