IPEDSearcher Class
Package:iped.engine.searchSource:
iped-engine/src/main/java/iped/engine/search/IPEDSearcher.java
The IPEDSearcher class is the primary interface for searching IPED cases.
Creating a Searcher
constructor
Creates a searcher for the specified case without a predefined query
constructor
Creates a searcher with a query string. The query is parsed using IPED’s query syntax.
constructor
Creates a searcher with a Lucene Query object
Basic Search Example
Query Methods
void
Sets the query from a text string. Throws
RuntimeException wrapping ParseException or QueryNodeException if the query syntax is invalid.void
Sets a Lucene Query object directly
Query
Returns the current Lucene Query object
Query Configuration
void
If false (default), excludes tree nodes from results. Tree nodes are internal structural items.
void
If true, disables relevance scoring for faster performance. Automatically enabled for result sets larger than 1 million items.
void
If true (default), rewrites queries for optimization
Example: Advanced Configuration
Executing Searches
SearchResult
Executes the search on a single IPEDSource and returns results. Throws
IOException on index access errors.MultiSearchResult
Executes the search on an IPEDMultiSource (multiple cases) and returns combined results. Throws
IOException on index access errors.void
Cancels an ongoing search operation
Multi-Case Search Example
SearchResult Interface
Package:iped.search
Result Methods
int
Returns the number of items in the search result
int[]
Returns an array of item IDs in the result set
IItemId
Returns the IItemId at the specified index in the result list
Iterator<IItemId>
Returns an iterator over the result set
Example: Processing Results
Query Syntax
IPED uses Lucene query syntax with field-specific searches.Basic Syntax
Field Names
Common indexed fields:String
Filename
String
Full file path
String
Detected file type extension
String
Original file extension
String
Item category (images, videos, documents, etc.)
String
Extracted text content (default field if no field specified)
Long
File size in bytes
String
Hash value (MD5, SHA-1, SHA-256, etc.)
Boolean
Whether file is deleted
Boolean
Whether file was recovered by carving
Query Examples
Range Queries
Wildcards and Regex
Boosting
Proximity Search
Advanced Search Patterns
Finding Suspicious Files
Filtering by Multiple Criteria
Excluding Items
Performance Optimization
Large Result Sets
Sorted Results
Use constructor with sort parameters:Caching Searches
QueryBuilder Class
Package:iped.engine.searchSource:
iped-engine/src/main/java/iped/engine/search/QueryBuilder.java
The QueryBuilder class provides programmatic query construction.
Creating Queries
constructor
Creates a query builder for the specified case
Query
Parses a query string and returns a Lucene Query object
Programmatic Query Building
Escaping Special Characters
Error Handling
Best Practices
See Also
- Item API - Access item properties and content
- Web API Search - REST API search endpoint
- Task API - Use searches in custom tasks