Spellcheck Output - AFS

SpellCheck

Product
AFS
AFS_Version
7.11
Category
Technical Notes
language
English
audience
public

The spellcheck output is displayed in a <afs:suggestion> tag.

Example

The following query:

/search?afs:service=1&afs:query=comissoion%20bancaire

generates the following output:

<afs:replySet>
<afs:meta uri="afs:spellcheck" totalItems="1" totalItemsIsExact="true" pageItems="1" firstPageItem="1" lastPageItem="1" durationMs="2" firstPaFId="1" lastPaFId="1" producer="spellcheck"/>
<afs:content>
<afs:reply docId="1" uri="URI">
<afs:title>
<afs:match>Commission</afs:match>
<afs:text>bancaire</afs:text>
</afs:title>
<afs:abstract>
<afs:text>Commission bancaire</afs:text>
</afs:abstract>
<afs:suggestion>
<afs:match text="Commission" src="comissoion"/>
<afs:text text="bancaire" pre=" " src="bancaire"/>
</afs:suggestion>
</afs:reply>
</afs:content>
</afs:replySet>

The @pre attribute is used to provide contextual helps to integrators, at user query reconstruction time, to define where spaces must be added during text/match/sep node concatenation.