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="");

Attribute Reference for the cfsearch tag

name

Required: Yes
Name of the search query.

collection

Required: Yes
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

Required: No
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

Required: No
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

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

type

Required: No
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

Required: No
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

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

startrow

Required: No
Default: 1
First row number to get.
Default: 1

suggestions

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

contextPassages

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

contextBytes

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

contextHighlightBegin

Required: No
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

Required: No
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

Required: No
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

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


Fork me on GitHub