obj search

Available for: Content Management Server

Task: The command searches by means of the Search Engine Server for files that match the specified search query.


obj search {parameter value}

Function parameters:

  • parameter specifies the name of a parameter whose value is passed as value. value can be one of the following:

    • query: specifies that value is a search query in the syntax of the search engine installed. The search query is checked for syntactical correctness neither by the Content Manager nor by the Search Engine Server. This parameter is obligatory.

    • minRelevance (optional): value specifies the minimal relevance that files matching the search query must have in order to be included in the search result. The value of value must be an integer number in the range from 0 to 100 (including both values), with 0 being the lowest and 100 the greatest possible relevance.

    • maxDocs (optional): Specifies that value is the maximum number (positive integer number) of hits to be returned.

    • offsetStart (optional): Specifies that value is the index of the first version ID to be returned by the Search Engine Server. value must be an integer number. The index of the first version in the search result is 1.

    • offsetLength (optional): Specifies that value contains the number of version IDs the Search Engine Server is to return. value must contain a positive integer number.

    • parser (optional): Specifies that value identifies the parser to be used by the search engine to process search queries. Valid values are explicit , freetext, and simple (default). Information about the parsers can be taken from the Verity Search Cartridge / Search Engine Server manual.

    • collections (optional): Specifies that value is a list of collections to which the search query is to be applied. If the parameter is not specified, all collections are searched.

    • returnOption (optional): Specifies that value identifies the type of the return value. value can be one of the following:

      objects (default): A list of file IDs is returned. Each ID is the aggregation of the version IDs returned by the search engine.

      includeContents: A list of lists is returned. Each sublist contains as its first element the file ID and as further elements the IDs of this file’s versions that match the search query.

      statistics: A list of four elements is returned, containing the following elements: hits number_of_hits searched number_of_versions_searched.

  • value is the value of the corresponding parameter.

Return value if successful: A list whose versions depends on the value of returnOption (see above).

Necessary permissions (CM only): no restrictions.

Additional information:

  • The Search Engine Server always returns version IDs which are by default put down to file IDs by this command.

  • The values of maxDocs, offsetStart, and offsetLength refer to the versions returned by the Search Engine Server in the search result and not to the results returned by this command.

  • This command returns only files to which the user has read access.


CM>obj search query {stock <#AND> options} \
returnOption includeContents

{2073 3044.3 2142.9} {4982 6683.1}