I'm looking for the rule for compound nouns. Do I say:
- phone number or number phone
- file type or type file
- bag school or school bag
<adjective><noun> so in "school bag", we are talking about the bag (which is used in school). "Bag school" we are talking about a school.
Could be even
<adjective1><adjective2><noun> and even more stacked adjectives, but last one is the noun.
the rule for word order in this case is
so, to take your examples in order:
the thing that you have (say 01234 567890) is a number. What type of number is it? it's a phone number.
a bit more abstract, what we have is a type (say, .doc). What sort of type is it? it's a file type.
the thing here is a bag. It's a bag you take to school, so it's a school bag.
As the other answers say, the general rule is adjective before noun (or, more generally, the noun comes after the word describing it1), so your specific phrases should be “phone number”, “file type”, and “school bag”. A “bag school” would be a school that taught something about bags. It sounds boring to me, but it might be a job prerequisite for baggage handlers (e.g., for hotels and airports) or grocery store clerks.
To give a perhaps slightly more mundane example, a “clown class” would be a course of education in how to be a clown (I’ve never heard of such a thing, but they probably exist), whereas a “class clown” is a person who behaves in a clown-like way while in class (and this is a common idiom).
This is the general (99%) rule. See Why do some adjectives follow the nouns they modify? for a discussion. It references the Wikipedia article on Postpositive adjectives, which says that the adjective-after-noun structure
1 As the other answers don’t point out, your question is interesting because it’s not about adjective+noun phrases; it’s about two-noun phrases. But the guidance is the same: the word for the thing that you’re talking about comes last (99% of the time). For example, “water faucet” is plumbing, but “tap water” is the liquid that comes out of it.