{"record":{"id":"f8ddbab2c5266d74","repo":"phacility/phabricator","slug":"searchengine-class-s-does-not-support-data-ex","errorCode":null,"errorMessage":"SearchEngine class (\"%s\") does not support data export.","messagePattern":"SearchEngine class \\(\"(.+?)\"\\) does not support data export\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php","lineNumber":277,"sourceCode":"\n    $engine_class = get_class($engine);\n\n    foreach ($queries as $query) {\n      $query_class = $query->getEngineClassName();\n      if ($query_class !== $engine_class) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Specified queries use different engines: query \"%s\" uses '.\n            'engine \"%s\", not \"%s\". All queries must run on the same '.\n            'engine.',\n            $query->getQueryKey(),\n            $query_class,\n            $engine_class));\n      }\n    }\n\n    if (!$engine->canExport()) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'SearchEngine class (\"%s\") does not support data export.',\n          $engine_class));\n    }\n\n    return array($engine, $queries);\n  }\n\n  private function newUnionQuery(\n    PhabricatorApplicationSearchEngine $engine,\n    array $queries) {\n\n    assert_instances_of($queries, 'PhabricatorSavedQuery');\n\n    $engine = clone $engine;\n\n    $ids = array();\n    foreach ($queries as $saved_query) {","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/bulk/management/PhabricatorBulkManagementExportWorkflow.php#L259-L295","documentation":"Even after the engine resolves, the export requires $engine->canExport() to be true; engines that never implemented data export fail here with the engine class named in the message. This check is also the gate that keeps non-exportable engines out of the --class candidate list, but a uniquely-matching or saved-query-derived engine still reaches it.","triggerScenarios":"Naming a concrete engine class via --class that resolves uniquely but whose canExport() returns false; exporting a saved query whose engine does not support export.","commonSituations":"Attempting to export an application Phabricator never gave export support; custom application search engines whose subclass did not implement the export methods.","solutions":["Pick an engine from the supported list (trigger the sibling 'no engines match' error once to see all export-capable engines enumerated).","For a custom engine, implement canExport() returning true plus the export field/row methods in the subclass.","Export a different, supported object type and join the data downstream."],"exampleFix":"// custom engine: opt in to data export\nclass MyThingSearchEngine extends PhabricatorApplicationSearchEngine {\n  public function canExport() {\n    return true;\n  }\n  // also implement the export field/row methods the export machinery calls\n}","handlingStrategy":"validation","validationCode":null,"typeGuard":"// inside Phabricator tooling: probe the capability before exporting\nfunction engineCanExport($engine_class) {\n  if (!class_exists($engine_class)) {\n    return false;\n  }\n  return (new $engine_class())->canExport();\n}","tryCatchPattern":"Catch PhutilArgumentUsageException, match 'does not support data export', and route the user to the export-capable engine list.","preventionTips":["Maintain a short allowlist of export-capable engine classes per install.","For custom engines, implement canExport() and the export methods together, not piecemeal."],"tags":["phabricator","cli","export","search-engine"],"backgroundTag":"unsupported-operation","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}