phacility/phabricator · warning · PhutilArgumentUsageException
Type "%s" matches multiple indexable objects. Use a more spe
Error message
Type "%s" matches multiple indexable objects. Use a more specific string. Matching objects are: %s.
What it means
The --type value in `bin/search index` is a case-insensitive substring match over indexable class names; when one string matches more than one class, the workflow cannot decide which object set you mean and throws this usage exception, listing every matching class. A longer or exact class name is required.
Source
Thrown at src/applications/search/management/PhabricatorSearchManagementIndexWorkflow.php:401
foreach ($objects as $object) {
$all_types[] = get_class($object);
}
sort($all_types);
$type_list = implode(', ', $all_types);
foreach ($type_map as $type => $normalized_type) {
$matches = idx($matches_map, $type);
if (!$matches) {
throw new PhutilArgumentUsageException(
pht(
'Type "%s" matches no indexable objects. '.
'Supported types are: %s.',
$type,
$type_list));
}
if (count($matches) > 1) {
throw new PhutilArgumentUsageException(
pht(
'Type "%s" matches multiple indexable objects. Use a more '.
'specific string. Matching objects are: %s.',
$type,
implode(', ', $matches)));
}
}
return $object_matches;
}
private function loadIndexVersions($phid) {
$table = new PhabricatorSearchIndexVersion();
$conn = $table->establishConnection('r');
return queryfx_all(
$conn,
'SELECT extensionKey, version FROM %T WHERE objectPHID = %sView on GitHub (pinned to 5720a38cfe)
Solutions
- Pick a longer substring from the matches listed in the message
- Use the full class name, e.g. `--type DifferentialRevision`
- If you actually want all matches, run the command once per matched class
Example fix
# before bin/search index --type diff # after bin/search index --type DifferentialDiff
Defensive patterns
Strategy: validation
Validate before calling
$classes = id(new PhutilClassMapQuery())
->setAncestorClass('PhabricatorIndexableInterface')
->execute();
$names = array_map('strtolower', array_map('get_class', $classes));
$needle = strtolower($type);
$matches = array_filter($names, function ($n) use ($needle) {
return strpos($n, $needle) !== false;
});
if (count($matches) !== 1) {
// require exactly one match before invoking bin/search index --type
} Prevention
- Prefer full class names for --type to guarantee a unique match
- After installing custom applications, re-check that short type strings still resolve uniquely
- Parse the match list from the error output when tuning the string
When it happens
Trigger: `--type phabricator` (prefix of many classes), `--type diff` matching several diff-related classes, or any short substring that occurs in multiple indexable class names on installs with custom applications.
Common situations: Forks or custom applications adding similarly named indexable classes; broad prefixes like "phabricator", "application", "repository"; using an abbreviated name that happens to occur elsewhere.
Related errors
- You can not use query constraint flags (like "--version", "-
- Provide a list of objects to index (like "D123"), or a set o
- '%s' is not the name of a known object.
- Type specification "%s" duplicates type specification "%s".
- Type "%s" matches no indexable objects. Supported types are:
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/8a41b906d1d65e40.
Report an issue: GitHub.