Find nodes matching multiple criteria simultaneously. Combines text search, node type filtering, page filtering, tag matching, and spatial region queries with AND logic.
Usage
kdx document find <file.kddb> [flags]
At least one filter flag is required.
Flags
| Flag | Description | Default |
|---|
--contains | Text/regex search pattern | |
--type | Filter by node type (e.g., line, paragraph) | |
--page N | Filter by page number (1-based) | |
--tag | Filter by tag name | |
--region x1,y1,x2,y2 | Spatial bounding box filter | |
--max N | Maximum number of results | 0 (unlimited) |
--pretty | Pretty-print JSON output | false |
Examples
Combined Filters
kdx document find doc.kddb --contains "total" --type line --page 3
{"nodeId":142,"type":"line","content":"Total Revenue: $1,234,567","page":3,"matchStart":0,"matchEnd":5}
Spatial Region Search
kdx document find doc.kddb --region 0,0,300,100 --page 1
Find by Tag
kdx document find doc.kddb --tag kodexa/amount --max 10 --pretty
Combine --contains with --region to search for text within a specific area of a page, useful for form field extraction.