# saxon:find()

saxon:find($indexed-sequence as jt:com.saxonica.extra.IndexedSequence) ==> item()*

saxon:find($indexed-sequence as jt:com.saxonica.extra.IndexedSequence, $key-values as xs:anyAtomicType*) ==> item()*

The first argument must be an indexed sequence created using the function saxon:index(). This will invariably be provided in the form of a variable reference. The type of this object is `{http://saxon.sf.net/java-type}com.saxonica.extra.IndexedSequence`

If the second argument is omitted, the function returns the entire indexed sequence, that is, the value passed to the first argument of `saxon:index()`.

Otherwise, the second argument is a sequence of atomic values. The result of the function consists of all items in the indexed sequence that match one or more of these atomic values. Duplicates are not removed. The order of the result is sorted first by the position of the key value within the sequence of key values, and then by the order of the result items within the indexed sequence.

If a key value is of type `xs:untypedAtomic`, it is treated as a string. Values are matched according to the rules of the `eq` operator. This means, for example, that if the indexed values are numbers, then the key value must be supplied as a number.

For examples of use, see saxon:index().

The `saxon:find` function is available only with Saxon-SA.

Next