Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings

Compass Support Forums » Compass » Compass Users

Thread: Index-only mode for Compass

This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 2 - Pages: 1 - Last Post: Sep 7, 2006 8:55 AM Last Post By: Shay Banon
Aleksei Valikov

Posts: 46
Registered: 3/6/06
Index-only mode for Compass
Posted: Aug 16, 2006 2:27 AM
  Click to reply to this thread Reply
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.

What do you think?
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Index-only mode for Compass
Posted: Aug 18, 2006 3:56 AM   in response to: Aleksei Valikov in response to: Aleksei Valikov
  Click to reply to this thread Reply
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.
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Index-only mode for Compass
Posted: Sep 7, 2006 8:55 AM   in response to: Shay Banon in response to: Shay Banon
  Click to reply to this thread Reply
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:
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums