Mtas can produce a list of available prefixes. To get this information, in Solr requests, besides the parameter to enable the Mtas query component, the following parameter should be provided.

Parameter Value Obligatory
mtas.stats.prefix true yes

Information for multiple fields can be produced within the same request. To distinguish them, a unique identifier has to be provided for each of the required statistics. The list of available prefixes is independent of any restriction in the document set, and also prefixes of deleted documents can be taken into account when the core hasn’t been optimized.

Parameter Value Info Obligatory
mtas.stats.prefix.<identifier>.key <string> key used in response no
mtas.stats.prefix.<identifier>.field <string> Mtas field yes

The key is added to the response and may be used to distinguish between multiple lists, and should therefore be unique. The response will contain three lists: prefixes strictly used for single position tokens, prefixes (also) used for multiple position tokens and prefixes used for multiple non adjacent positions. Notice that the last list will always be a subset of the second list.


  1. Basic : list of available prefixes.


List of avilable prefixes.

Request and response

        "key":"example - basic",


To get a list of prefixes directly in Lucene, ComponentPrefix together with the provided collect method can be used.