IDA C++ SDK 9.2
Loading...
Searching...
No Matches
indexer.hpp File Reference

Indexer API: search functions, names, local types, segments and function comments. More...

Go to the source code of this file.

Classes

struct  match_range_t
 A half-open character range [start, end) within a result name string, indicating which characters were matched by the query (or are most relevant to with fuzzy matching). More...
struct  match_config_t
 Configuration for an indexer search. More...
struct  search_result_data_t
 Opaque handle owning a set of search results returned by the indexer. More...

Typedefs

using subindex_typeid_t = size_t
 Numeric identifier for a sub-index category. See #builtin_idxes_t.

Enumerations

enum  match_mode_t { STR_MATCH , FUZZY }
 Matching algorithm used by the indexer. More...

Functions

enum builtin_idxes_t ENUM_SIZE (subindex_typeid_t)
 Identifiers for the built-in indexer sub-categories.
 DECLARE_TYPE_AS_MOVABLE (match_range_t)
 DECLARE_TYPE_AS_MOVABLE (match_config_t)
idaman bool ida_export indexer_is_enabled ()
 Returns true if the indexer is enabled for the current database.
idaman search_result_data_t *ida_export indexer_match_all (const qstring &query, const match_config_t &config)
 Search all sub-indexes for query using config.
idaman search_result_data_t *ida_export indexer_match (subindex_typeid_t subindex_id, const qstring &query, const match_config_t &config)
 Search a single sub-index identified by subindex_id for query.

Detailed Description

Indexer API: search functions, names, local types, segments and function comments.

The indexer maintains a data structure optimized for substring matching, allowing queries to be answered quickly regardless of database size. Substring matching is further accelerated using multiple threads.

Typedef Documentation

◆ subindex_typeid_t

using subindex_typeid_t = size_t

Numeric identifier for a sub-index category. See #builtin_idxes_t.

Enumeration Type Documentation

◆ match_mode_t

Matching algorithm used by the indexer.

Enumerator
STR_MATCH 

Substring match (default). Fast and exact.

FUZZY 

Fuzzy match.

Tolerates typos and abbreviations.

Warning
Experimental - results and scoring may change in future versions.

Function Documentation

◆ ENUM_SIZE()

enum builtin_idxes_t ENUM_SIZE ( subindex_typeid_t )

Identifiers for the built-in indexer sub-categories.

< Invalid / unset value.

< Functions (mangled and demangled names).

< Local types defined in the IDB.

< Names in the name list (both mangled and demangled)

< Segment names.

< Non-repeatable function comments.

< Repeatable function comments.

◆ DECLARE_TYPE_AS_MOVABLE() [1/2]

DECLARE_TYPE_AS_MOVABLE ( match_range_t )

◆ DECLARE_TYPE_AS_MOVABLE() [2/2]

DECLARE_TYPE_AS_MOVABLE ( match_config_t )

◆ indexer_is_enabled()

idaman bool ida_export indexer_is_enabled ( )

Returns true if the indexer is enabled for the current database.

The indexer is controlled by the ENABLE_INDEXER configuration option and requires the database to have been opened with indexing support.

◆ indexer_match_all()

idaman search_result_data_t *ida_export indexer_match_all ( const qstring & query,
const match_config_t & config )

Search all sub-indexes for query using config.

Returns
a heap-allocated result set; the caller must delete it. Returns nullptr if the indexer is not enabled.

◆ indexer_match()

idaman search_result_data_t *ida_export indexer_match ( subindex_typeid_t subindex_id,
const qstring & query,
const match_config_t & config )

Search a single sub-index identified by subindex_id for query.

Returns
a heap-allocated result set; the caller must delete it. Returns nullptr if the indexer is not enabled or subindex_id is invalid.