conv net data retrieval on unseen class
It depends. Let me explain you what features are detected when you train a classification model.

Let's take same example as yours - car and truck classification. The CNN will extract features from both type of images - tires, windows, shape, texture etc. 

Then it'll separate the features - if it sees something like bigger tires, bigger windows, rectangular shape, it'll give more weight to truck class. Similarly for car class.

Now coming to your image retrieval part. This is what you're doing - passing all the image through CNN and extracting features for each image. Then comparing your test image features with other features to find most similar one.

Now think, what if you pass new image to the same CNN ? What features will be extracted. 

CNN will extract the same features as it used to for car and truck - tires, windows, shape etc. Because it's trained for that only. It won't start extracting wings as feature if you pass airplane.

So if you pass airplane as test image - same features as car and truck would be extracted and you will get results based on the comparison of these features. Hence if you pass yellow small airplane, you might get yellow small car having same tire size as your airplane or yellow small truck having shape similar to your plane or in best case yellow small airplane.