Typeahead Suggestions
Contents
Typeahead Suggestions#
The search bar within Squirro Cognitive Search offers a rich set of type-ahead functionalities out of the box.

Based on Document Features#
Based on User Interaction#
User’s Saved Searches
User’s Search History
Popular Queries across the project (or for a single user)
Typeahead Suggestions Via SquirroClient
#
All suggestions can be accessed programmatically via the SquirroClient (Python SDK). For this see TopicApiBaseMixin
, specifically get_typeahead_suggestions()
.
Configuration#
Typeahead Suggestions can be configured in Setup > Settings > Project Configuration.
Suggestions Based on Document Content#
Project Configuration topic.typeahead.content.configuration
{
"fuzziness": string,
"fuzzy_max_expansions": int,
"fuzzy_prefix_length": int,
"in_order": bool,
"slop": int,
"terminate_after": int
}
Reference: Configuration Schema
- fuzziness
- Type:
string
Required:False
Default:"AUTO"
Specifies the maximum edit distance allowed for matching. The fuzziness parameter can be specified as:
0, 1, 2: The maximum allowed Levenshtein Edit Distance (or number of edits)
AUTO : Generates an edit distance based on the length of the term
- fuzzy_max_expansions
- Type:
int
Required:False
Default: 1Specifies the maximum number of variations created.
- fuzzy_prefix_length
- Type:
int
Required:False
Default: 2Specifies number of beginning characters left unchanged when creating expansions.
- in_order
- Type:
bool
Required:False
Default: FalseSpecifies whether matched spans are required to be in-order.
- slop
- Type:
int
Required:False
Default: 6Specifies the maximum number of intervening unmatched positions.
- terminate_after
- Type:
int
Required:False
Default: 15000Tradeoff between accurate matching and speed. The typeahead search request gets terminated after N matching documents (per shard) are found. Potentially higher scoring results may be missed out.
Suggestions Based on Facet Values#
Project Configuration topic.typeahead.facetvalue.configuration
{
"terminate_after": string,
"sample_shard_size": int,
"aggregation_method": "significant_terms",
"community_drill_down": {
"enabled": true,
"for_top_n": 1
}
}
Reference: Configuration Schema
- terminate_after
- Type:
int
Required:False
Default: 15000Tradeoff between accurate matching and speed. The typeahead search request gets terminated after N matching documents (per shard) are found. Potentially higher scoring results may be missed out.
- sample_shard_size
- Type:
int
Required:False
Default: 100Facet Value suggestions is based on the Terms aggregation on the matching subset of Items. The sample_shard_size parameter limits how many top-scoring documents are collected in the sample processed on each shard. Lower values tend to return facet-value suggestions faster (but with less accurate order) and tightens the focus to high-relevance matches rather than the potentially very long tail of low-quality matches.
- aggregation_method
- Type:
string
Required:False
Default: significant_termsChoose between significant_terms or terms aggregation to find best matching Facet Values.
- community_drill_down
- Type:
json
Required:False
Enable drilling down of top-ranked communities by setting community_drill_down.enabled:true