Search for matrix field in a global set
As far as I know, (currently) the only way to filter matrix blocks is to use the type method to filter by block type or to limit the amount of returned matrix models with limit.

Here's what I'd do:

{% set searchString = 'sitelogo' %}

{# Search for potential matrix blocks #}
{% set foundBlocks = attachmentGlobals.globalFiles.type('files').search(searchString) %}

{# Loop through the result and output the right one #}
{% for foundBlock in foundBlocks %}

    {% if foundBlock.fileId == searchString %}
        &lt;img src="{{ foundBlock.fileAsset.first.url }}" alt="{{ foundBlock.fileAsset.first.title }}"&gt;
    {% endif %}

{% endfor %}


You can't use search('fileId:sitelogo'), because that would filter for entries with  fileId:sitelogo and not entries with a matrix block fileId:sitelogo.