ejsCompletionSuggester

Module

 CompletionSuggester

CompletionSuggester ( name )

A suggester that allows basic auto-complete functionality.


Since
elasticsearch 0.90.4
Parameters
name <String> The name which be used to refer to this suggester.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectanalyzer(analyzer)

Sets analyzer used to analyze the suggest text.

ObjecteditDistance(d)

Maximum edit distance (fuzziness), defaults to 1. Automatically enables fuzzy suggestions when set to any value.

Objectfield(field)

Sets the field used to generate suggestions from.

Objectfuzzy(trueFalse)

Enable fuzzy completions which means a can spell a word incorrectly and still get a suggestion.

ObjectminLength(m)

Minimum length of the input before fuzzy suggestions are returned, defaults to 3. Automatically enables fuzzy suggestions when set to any value.

ObjectprefixLength(l)

Minimum length of the input, which is not checked for fuzzy alternatives, defaults to 1. Automatically enables fuzzy suggestions when set to any value.

ObjectshardSize(s)

Sets the maximum number of suggestions to be retrieved from each individual shard.

Objectsize(s)

Sets the number of suggestions returned for each token.

Objecttext(txt)

Sets the text to get suggestions for. If not set, the global suggestion text will be used.

StringtoJSON()

Retrieves the internal suggest object. This is typically used by internal API functions so use with caution.

Objecttranspositions(trueFalse)

Sets if transpositions should be counted as one or two changes, defaults to true when fuzzy is enabled. Automatically enables fuzzy suggestions when set to any value.

ObjectunicodeAware(trueFalse)

Sets all are measurements (like edit distance, transpositions and lengths) in unicode code points (actual letters) instead of bytes. Automatically enables fuzzy suggestions when set to any value.


Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 analyzer

Object analyzer ( analyzer )

Sets analyzer used to analyze the suggest text.


Parameters
analyzer <String> A valid analyzer name.
Returns
returns this so that calls can be chained.

 editDistance

Object editDistance ( d )

Maximum edit distance (fuzziness), defaults to 1. Automatically enables fuzzy suggestions when set to any value.


Parameters
d <Integer> A positive integer value.
Returns
returns this so that calls can be chained.

 field

Object field ( field )

Sets the field used to generate suggestions from.


Parameters
field <String> A valid field name.
Returns
returns this so that calls can be chained.

 fuzzy

Object fuzzy ( trueFalse )

Enable fuzzy completions which means a can spell a word incorrectly and still get a suggestion.


Parameters
trueFalse <Boolean> true to enable fuzzy completions, false to disable.
Returns
returns this so that calls can be chained.

 minLength

Object minLength ( m )

Minimum length of the input before fuzzy suggestions are returned, defaults to 3. Automatically enables fuzzy suggestions when set to any value.


Parameters
m <Integer> A positive integer value.
Returns
returns this so that calls can be chained.

 prefixLength

Object prefixLength ( l )

Minimum length of the input, which is not checked for fuzzy alternatives, defaults to 1. Automatically enables fuzzy suggestions when set to any value.


Parameters
l <Integer> A positive integer value.
Returns
returns this so that calls can be chained.

 shardSize

Object shardSize ( s )

Sets the maximum number of suggestions to be retrieved from each individual shard.


Parameters
s <Integer> A positive integer value.
Returns
returns this so that calls can be chained.

 size

Object size ( s )

Sets the number of suggestions returned for each token.


Parameters
s <Integer> A positive integer value.
Returns
returns this so that calls can be chained.

 text

Object text ( txt )

Sets the text to get suggestions for. If not set, the global suggestion text will be used.


Parameters
txt <String> A string to get suggestions for.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )

Retrieves the internal suggest object. This is typically used by internal API functions so use with caution.


Returns
returns this object's internal suggest property.

 transpositions

Object transpositions ( trueFalse )

Sets if transpositions should be counted as one or two changes, defaults to true when fuzzy is enabled. Automatically enables fuzzy suggestions when set to any value.


Parameters
trueFalse <Boolean> true to enable transpositions.
Returns
returns this so that calls can be chained.

 unicodeAware

Object unicodeAware ( trueFalse )

Sets all are measurements (like edit distance, transpositions and lengths) in unicode code points (actual letters) instead of bytes. Automatically enables fuzzy suggestions when set to any value.


Parameters
trueFalse <Boolean> true to set unicode aware, false to disable.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo