Class FinderIndexerQuery

Description

Query class for the Finder indexer package.

  • since: 2.5

Located in /administrator/components/com_finder/helpers/indexer/query.php (line 25)


	
			
Variable Summary
string $date1
string $date2
array $excluded
string $filter
array $filters
array $highlight
array $ignored
array $included
string $input
string $language
string $mode
array $operators
boolean $search
integer $terms
string $when1
string $when2
Method Summary
FinderIndexerQuery __construct (array $options)
boolean processDates (string $date1, string $date2, string $when1, string $when2)
boolean processDynamicTaxonomy (array $filters)
boolean processStaticTaxonomy (integer $filterId)
boolean processString (string $input, string $lang, string $mode)
string toURI ([string $base = null])
Variables
string $date1 (line 137)

The start date filter.

  • since: 2.5
  • access: public
string $date2 (line 145)

The end date filter.

  • since: 2.5
  • access: public
array $excluded = array() (line 73)

The excluded tokens.

  • since: 2.5
  • access: public
string $filter (line 113)

The static filter id.

  • since: 2.5
  • access: public
array $filters = array() (line 129)

The taxonomy filters. This is a multi-dimensional array of taxonomy branches as the first level and then the taxonomy nodes as the values.

For example: $filters = array( 'Type' = array(10, 32, 29, 11, ...); 'Label' = array(20, 314, 349, 91, 82, ...); ... );

  • since: 2.5
  • access: public
array $highlight = array() (line 97)

The terms to highlight as matches.

  • since: 2.5
  • access: public
array $ignored = array() (line 81)

The tokens to ignore because no matches exist.

  • since: 2.5
  • access: public
array $included = array() (line 65)

The included tokens.

  • since: 2.5
  • access: public
string $input (line 41)

The query input string.

  • since: 2.5
  • access: public
string $language (line 49)

The language of the query.

  • since: 2.5
  • access: public
string $mode (line 57)

The query string matching mode.

  • since: 2.5
  • access: public
array $operators = array() (line 89)

The operators used in the query input string.

  • since: 2.5
  • access: public
boolean $search (line 33)

Flag to show whether the query can return results.

  • since: 2.5
  • access: public
integer $terms (line 105)

The number of matching terms for the query input.

  • since: 2.5
  • access: public
string $when1 (line 153)

The start date filter modifier.

  • since: 2.5
  • access: public
string $when2 (line 161)

The end date filter modifier.

  • since: 2.5
  • access: public
Methods
Constructor __construct (line 171)

Method to instantiate the query object.

  • since: 2.5
  • throws: Exception on database error.
  • access: public
FinderIndexerQuery __construct (array $options)
  • array $options: An array of query options.
getExcludedTermIds (line 367)

Method to get a list of excluded search term ids.

  • return: An array of excluded term ids.
  • since: 2.5
  • access: public
array getExcludedTermIds ()
getIncludedTermIds (line 392)

Method to get a list of included search term ids.

  • return: An array of included term ids.
  • since: 2.5
  • access: public
array getIncludedTermIds ()
getRequiredTermIds (line 435)

Method to get a list of required search term ids.

  • return: An array of required term ids.
  • since: 2.5
  • access: public
array getRequiredTermIds ()
getTokenData (line 1279)

Method to get the base and similar term ids and, if necessary, suggested

term data from the database. The terms ids are identified based on a 'like' match in MySQL and/or a common stem. If no term ids could be found, then we know that we will not be able to return any results for that term and we should try to find a similar term to use that we can match so that we can suggest the alternative search query to the user.

  • return: A FinderIndexerToken object.
  • since: 2.5
  • throws: Exception on database error.
  • access: protected
FinderIndexerToken getTokenData (FinderIndexerToken $token)
processDates (line 687)

Method to process the query date filters to determine start and end date limitations.

  • return: True on success.
  • since: 2.5
  • access: protected
boolean processDates (string $date1, string $date2, string $when1, string $when2)
  • string $date1: The first date filter.
  • string $date2: The second date filter.
  • string $when1: The first date modifier.
  • string $when2: The second date modifier.
processDynamicTaxonomy (line 592)

Method to process the dynamic taxonomy input. The dynamic taxonomy input

comes in the form of select fields that the user chooses from. The dynamic taxonomy input is processed AFTER the static taxonomy input because the dynamic options can be used to further narrow a static taxonomy filter.

  • return: True on success.
  • since: 2.5
  • throws: Exception on database error.
  • access: protected
boolean processDynamicTaxonomy (array $filters)
  • array $filters: An array of taxonomy node ids.
processStaticTaxonomy (line 481)

Method to process the static taxonomy input. The static taxonomy input comes in the form of a pre-defined search filter that is assigned to the search form.

  • return: True on success, false on failure.
  • since: 2.5
  • throws: Exception on database error.
  • access: protected
boolean processStaticTaxonomy (integer $filterId)
  • integer $filterId: The id of static filter.
processString (line 753)

Method to process the query input string and extract required, optional, and excluded tokens; taxonomy filters; and date filters.

  • return: True on success.
  • since: 2.5
  • throws: Exception on database error.
  • access: protected
boolean processString (string $input, string $lang, string $mode)
  • string $input: The query input string.
  • string $lang: The query input language.
  • string $mode: The query matching mode.
toURI (line 272)

Method to convert the query object into a URI string.

  • return: The complete query URI.
  • since: 2.5
  • access: public
string toURI ([string $base = null])
  • string $base: The base URI. [optional]

Documentation generated on Mon, 25 Jun 2012 13:58:59 -0500 by phpDocumentor 1.4.4