#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# AutoCompleteFilters Class

Defined in: `autocomplete/js/autocomplete-filters.js:1`
Module: autocomplete-filters
Parent Module: autocomplete

Provides pre-built result matching filters for AutoComplete.

- Index
- Methods

## Item Index

### Methods

- charMatch static
- charMatchCase static
- charMatchFold static
- phraseMatch static
- phraseMatchCase static
- phraseMatchFold static
- startsWith static
- startsWithCase static
- startsWithFold static
- subWordMatch static
- subWordMatchCase static
- subWordMatchFold static
- wordMatch static
- wordMatchCase static
- wordMatchFold static

## Methods

### `charMatch`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:17`

Returns an array of results that contain all of the characters in the query, in any order (not necessarily consecutive). Case-insensitive.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `charMatchCase`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:49`

Case-sensitive version of `charMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `charMatchFold`

(

- `query`
- `results`

)
Array static

Provided by the autocomplete-filters-accentfold module.

Defined in `autocomplete/js/autocomplete-filters-accentfold.js:23`

Accent folding version of `charMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `phraseMatch`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:62`

Returns an array of results that contain the complete query as a phrase. Case-insensitive.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `phraseMatchCase`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:87`

Case-sensitive version of `phraseMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `phraseMatchFold`

(

- `query`
- `results`

)
Array static

Provided by the autocomplete-filters-accentfold module.

Defined in `autocomplete/js/autocomplete-filters-accentfold.js:46`

Accent folding version of `phraseMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `startsWith`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:100`

Returns an array of results that start with the complete query as a phrase. Case-insensitive.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `startsWithCase`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:125`

Case-sensitive version of `startsWith()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `startsWithFold`

(

- `query`
- `results`

)
Array static

Provided by the autocomplete-filters-accentfold module.

Defined in `autocomplete/js/autocomplete-filters-accentfold.js:65`

Accent folding version of `startsWith()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `subWordMatch`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:138`

Returns an array of results in which all the words of the query match either whole words or parts of words in the result. Non-word characters like whitespace and certain punctuation are ignored. Case-insensitive.

This is basically a combination of `wordMatch()` (by ignoring whitespace and word order) and `phraseMatch()` (by allowing partial matching instead of requiring the entire word to match).

Example use case: Trying to find personal names independently of name order (Western or Eastern order) and supporting immediate feedback by allowing partial occurences. So queries like "J. Doe", "Doe, John", and "J. D." would all match "John Doe".

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `subWordMatchCase`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:178`

Case-sensitive version of `subWordMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `subWordMatchFold`

(

- `query`
- `results`

)
Array static

Provided by the autocomplete-filters-accentfold module.

Defined in `autocomplete/js/autocomplete-filters-accentfold.js:84`

Accent folding version of `subWordMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `wordMatch`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:191`

Returns an array of results that contain all of the words in the query, in any order. Non-word characters like whitespace and certain punctuation are ignored. Case-insensitive.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `wordMatchCase`

(

- `query`
- `results`

)
Array static

Defined in `autocomplete/js/autocomplete-filters.js:222`

Case-sensitive version of `wordMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results

### `wordMatchFold`

(

- `query`
- `results`

)
Array static

Provided by the autocomplete-filters-accentfold module.

Defined in `autocomplete/js/autocomplete-filters-accentfold.js:107`

Accent folding version of `wordMatch()`.

#### Parameters:

- `query` String

  Query to match

- `results` Array

  Results to filter

#### Returns:

Array: Filtered results