> ## 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.

# Controlling Searches

> Functions for controlling FlexiLayout element searches: Optional, StopIfFound, DontFind, and MaxHypothesesCount for hypothesis generation and skipping.

| Function                                | Description                                                                                                                                                                                                                                                                         |
| :-------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Void Optional( Real q1, Real q2 )`     | Makes an element optional. The q1 parameter sets the quality of the null hypothesis. The q2 parameter sets the criterion for formulating the null hypothesis: the null hypothesis will be formulated if no other hypotheses are created whose qualities exceed a certain threshold. |
| `Void StopIfFound ( Logic Value=true )` | Stops generating hypothesis in the branch if it contains a non-null hypothesis for the given element. For more information, see the Required, optional, and prohibited elements section.                                                                                            |
| `Void DontFind()`                       | Tells the program not to look for an element. If the element is optional, only the null hypothesis will be formulated.                                                                                                                                                              |
| `Void MaxHypothesesCount( Int )`        | Sets the maximum number of hypotheses for an element.                                                                                                                                                                                                                               |
