GNU Dictionary Server
B.2.2 The MATCH Command
MATCH command searches for word in the database index.
The searching algorithm is determined by strategy. See Strategies,
for a list of strategies offered by GNU Dico.
- Command: MATCH database strategy word
Match word in database using strategy. As with
DEFINE, the database can be ‘!’ or ‘*’ (See DEFINE, for a detailed description of these wildcards).
The strategy is either the name of a strategy to use, or a dot (‘.’), meaning to use default strategy. The default strategy is set using
default-strategyconfiguration file statement (see default-strategy. Its default value is ‘lev’, which means ‘use Levenshtein algorithm’ (see Strategies).
If no matches are found in any of the searched databases, then response code 552 will be returned. Otherwise, response code 152 will be returned followed by a list of matched words, one per line, in the form:
Thus, prepending a ‘DEFINE ’ to each such response, one obtains a valid
The textual body of the match list is terminated with a line containing only a dot character.
Following the list, response code 250 is sent, which includes timing information, if
timingdirective is set in the configuration file (see Tuning).
- 550 Invalid database, use SHOW DB for a list
- 551 Invalid strategy, use SHOW STRAT for a list
- 552 No match
- 152 n matches found: list follows
- 250 ok (optional timing information here)
C: MATCH * . "weather" S: 152 12 matches found: list follows C: eng-afr "feather" C: eng-afr "leather" C: eng-afr "weather" C: eng-deu "feather" C: eng-deu "heather" C: eng-deu "leather" C: eng-deu "weather" C: eng-deu "wether" C: eng-deu "wheather" C: devils "WEATHER" S: . S: 250 Command complete [d/m/c = 0/12/100677 0.489r 0.479u 0.007s]
This document was generated on September 25, 2018 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.