<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/spell.suggest.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>spell.suggest</api:function-name><api:suggest>spell.suggest</api:suggest><api:suggest>spell</api:suggest><api:suggest>suggest</api:suggest><api:function-link mode="xquery" fullname="spell:suggest">/apidoc/8.0/spell:suggest.xml</api:function-link><api:function mode="javascript" name="suggest" type="builtin" lib="spell" category="SpellBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="spell" namespace="http://marklogic.com/xdmp/spell" fullname="spell.suggest"><api:summary>
  Suggests a list of spellings for a word. <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">Returns a ValueIterator 
  containing </span> the most likely spellings for the specified word.
</api:summary><api:params><api:param name="uri" type="xs:string*"><api:param-description>
    The URIs of the dictionaries to use.
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="word" type="xs:string"><api:param-description>
    The word for which you get spelling suggestions.
  </api:param-description><api:param-name>word</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="options" type="(element()|map:map)?" optional="true"><api:param-description>
    The options 
    <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">object</span> for this suggest operation. 
    The default is 
    <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">null</span>. 

    
    <p xmlns="http://www.w3.org/1999/xhtml">The 
    <span class="javascript"><code>spell.suggest</code></span> options 
    include:</p>
    <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
    <dt>
        <span class="javascript">maximum</span>
        </dt>
    <dd>Specifies the maximum number of suggestions to be returned.
    The default is 10.</dd>
    <dt>
        <span class="javascript">distanceThreshold</span>
        </dt>
    <dd>Specifies a cut off threshold for suggestions having a distance
    less than the given number.  The default is 100.  </dd>
    </dl></blockquote>
  </api:param-description><api:param-name>options</api:param-name><api:param-type>Object?</api:param-type></api:param></api:params><api:return class="javascript">ValueIterator</api:return><api:usage>
   

   <p xmlns="http://www.w3.org/1999/xhtml">The <code>
                 <span class="javascript">spell.suggest</span>
           </code> function only provides suggestions
   to words that are less than 64 characters in length; words 64 characters
   or longer return no suggestions.  Also, it removes any dictionary entries
   that are 64 characters or more, so it will never return a suggestion with
   greater than 64 characters.</p>
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
spell.suggest("myDictionary.xml","occasionally")

=&gt; A ValueIterator with the values for each suggestion:
   occasionally occasional occasion occasions occasion's
   occasioned optionally educationally irrationally
</pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
spell.suggest("spell.xml", "albetros")

=&gt; A ValueIterator with the values for each suggestion:
   albatross abettors alders alters Albert's Elbert's
   allegros alder's Walters abettor's
</pre></api:example></api:function></api:function-page>