Expand Exact Phrase Searches

QMS does not apply synonym rules to exact phrase searches unless you set the parameter ExpandPhrases to TRUE. For example, with the default configuration, if a user searches for "software development kit" (including the quotation marks), QMS does not modify the query.

To change the default behavior and apply synonym rules to exact phrase searches, set ExpandPhrases=TRUE in the [Server] section of the configuration file. You can also override the default setting for specific actions by setting the ExpandPhrases action parameter.

For example, you might create the following synonym rule:

#DREREFERENCE sdk_synonyms
#DRETITLE sdk synonyms
#DREDBNAME ACTIVATED
#DREFIELD QMSTYPE="4"
#DREFIELD QMSAGENTBOOL="SDK software development kit"
#DREFIELD KEYWORDS="SDK,software development kit"
#DREFIELD CONCEPT="SYNONYM(SDK "software development kit")"
#DREFIELD DATABASERESTRICTION=""
#DRECONTENT
SDK software development kit
#DREENDDOC

You can then send queries to QMS:

  • The following action demonstrates the default behavior:

    /action=ExpandText&Text="software development kit"&ExpandPhrases=FALSE

    QMS returns the following (unmodified) query:

    "software development kit"
  • The following action demonstrates ExpandPhrases=TRUE.

    /action=ExpandText&Text="software development kit"&ExpandPhrases=TRUE

    QMS uses your synonym rule to expand the exact phrase and returns the following (expanded) query:

    SYNONYM(SDK "software development kit")