> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 検索制御関数

> FlexiLayout language で Optional、StopIfFound、DontFind、MaxHypothesesCount 関数を使用して、仮説生成のための要素検索を制御します。

FlexiLayout language には、要素の検索と仮説生成を制御するための次の関数が用意されています。

<div id="search-control-functions">
  ## 検索制御関数
</div>

| 定義                                       | 説明                                                                                                                       |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Void Optional( Real q1, Real q2 )`      | 要素を任意にします。`q1` パラメーターはヌル仮説の品質を設定します。`q2` パラメーターはヌル仮説を立てる基準を設定します。品質が特定のしきい値を超える他の仮説が1つも生成されない場合、ヌル仮説が立てられます。             |
| `Void StopIfFound( Logic Value = true )` | 指定した要素について非ヌル仮説が含まれている場合、その分岐での仮説生成を停止します。詳しくは、[必須、任意、禁止の要素](/ja/flexi-capture/fls/template/elements-optional)を参照してください。 |
| `Void DontFind()`                        | FlexiLayout Studio に要素を検索しないよう指示します。要素が任意の場合は、ヌル仮説のみが立てられます。                                                             |
| `Void MaxHypothesesCount( Int )`         | 要素に対する仮説の最大数を設定します。                                                                                                      |
