私は次のxml構造を持っています:
<root>
<text>Hi i am a test user and doing testing here. Copied text Let’s suppose we have a text field where the user needs to enter the number of a person id. If the user types 1, all ids starting with 1 will show up. If the user types 12, all ids starting with 12 will show up.</text>
</root>
今、私は「テキスト」要素にフィールドを作成し、フィールドワードレキシコンも有効にしました。次のクエリを実行しました:
xquery version "1.0-ml";
import module namespace search ="http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy";
let $options :=
<search:options xmlns="http://marklogic.com/appservices/search">
<default-suggestion-source>
<word collation="http://marklogic.com/collation//S2">
<field name="text"/>
</word>
</default-suggestion-source>
</search:options>
return
search:suggest("tes", $options, 100)
その結果、私は「テスト」と「設定」を提案として得ましたが、これはまったく問題ありませんが、上記の場合のように、「テストユーザーと実行中...」と「ここでテスト中...」を期待しているテキストも必要です。これについて私を助けてください。