I'd like to express some thoughts about the "index-only" mode of Compass which I'm really missing.
What I think many users are looking for in Compass is simply the indexing facility for objects. You give your object in, it gets converted into a Resource/Document and indexed. After that you can locate it by executing a query.
But what I think many users do not need in Compass is the storage facility. For instance, if you use Compass in parallel with Hibernate, you will never use Compass to retrieve you objects. You'll search for ids and get objects from Hibernate, it's Hibernate that is used for storage, not Compass.
Such users would really benefit from an "index-only" mode of Compass. In this mode, Compass implements no unmarshalling at all, you can't retrieve your objects back - only Resources. A special ResourceTransformer could be used in queries to transform resources into some objects (for instance, some kind of Descriptions holding the information you need to display about the found objects).
As far as I'm familiar with Compass interns, I'd say that since "index-only" mode does not need to implement unmarshalling, it is much easier in implementation. You don't need to store a lot of special properties, you don't need to optimize mapping structure for unmarshalling, you don't need the unmarshalling at all.
Makes a lot of sense. Currently, you have to specify managed-id="false" on all the properties. Anyhow, you would also get collection size for example stored in the index (no way to turn this off).
I think that there can be a new attribute that says that the class can only be used for marshalling, and another setting that set all the mapping in Compass to be used only for marshalling. This will cause Compass not to create any internal meta-data at all. If you open a JIra issue for it, we can work on it.
Do you also mean that you wish for Compass not to statically compile mappings on statup? This can also be done, but I think that it should be a part of a different feature, where Compass can work in two modes, one static and one dynamic. I am still thinking about this feature, as it is not so simple to implement, but I do understand the need for dynamic mode.
This was added as a feature in the upcoming 1.1 M2 release. It is in the SNAPSHOT release under the supportUnmarshall feature. I blogged about this here: http://jroller.com/page/kimchy?entry=compass_and_support_unmarshall.