Class FinderIndexerQuery

Description

Query class for the Finder indexer package.

  • since: 2.5

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


	
			
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 136)

The start date filter.

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

The end date filter.

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

The excluded tokens.

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

The static filter id.

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

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 96)

The terms to highlight as matches.

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

The tokens to ignore because no matches exist.

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

The included tokens.

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

The query input string.

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

The language of the query.

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

The query string matching mode.

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

The operators used in the query input string.

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

Flag to show whether the query can return results.

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

The number of matching terms for the query input.

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

The start date filter modifier.

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

The end date filter modifier.

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

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 366)

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 390)

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 433)

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 1259)

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 664)

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 576)

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 479)

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 730)

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 271)

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 Tue, 19 Nov 2013 15:11:28 +0100 by phpDocumentor 1.4.3