I have a document library which documents are actually document sets each one.
The only way to diferentiate each item is with the column called name, which is actually a guid.
I need to query with that column, but in the UI, it tells me that its a file.
The next code, I tried also with type = Text. but it didnt work.
SPList agendaPoints = subSite.GetSafeListByName(MeetingsCommon.Constants
.LISTS_X);
SPQuery query = new SPQuery();
query.Query = string.Concat(" <Where>", "<Eq>", "<FieldRef Name='Name' />",
"<Value Type='File'>" + name + "</Value>","</Eq>",
"</Where>");
The exception is: Microsoft.SharePoint.SPException: One or more field types are not installed properly

I can query with document set using “Document Set ID”.
see this link might be helpful for you.
http://blogs.devhorizon.com/reza/2010/09/26/querying-document-sets-using-spsitedataquery/