SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: Question about managed-id

This question is answered.


Permlink Replies: 3 - Pages: 1 - Last Post: Jan 30, 2007 10:48 AM Last Post By: msolnit
msolnit

Posts: 108
Registered: 10/12/06
Question about managed-id
Posted: Jan 29, 2007 3:37 PM
 
  Click to reply to this thread Reply
Hi there. I am just starting to get the hang of managed-id. It seems to do what I expect in most cases, but I have one property mapping:

<property name="content">
  <meta-data store="compress">content</meta-data>
</property>

which ends up with both a "$/event/content" field and a "content" field. I am concerned about the amount of space used, because this property will tend to have large values.

I added "managed-id='false'" to the mapping, and now I get a single "content" field, which is what I want. I also found that the time to index an object went down dramatically.

My question is, am I doing this correctly? What are the side-effects of turning off the managed-id? Is it expected that Compass will create a managed-id simply because the property is stored compressed inside the index?

-- Matt
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Question about managed-id
Posted: Jan 30, 2007 1:37 AM   in response to: msolnit in response to: msolnit
Helpful
  Click to reply to this thread Reply
Compass created a managed id for the content meta data because somewhere within the root mapping (and its component mappings) there is another content meta data. In order for Compass to properly un-marshall the data from the index back into an Object, it has to create an internal representation of it.

My guess is that you do not have another content meta-data in your mapping, and it is simply a bug in Compass. Compass checks for the meta-data to be stored, but it also needs to check if it is compressed, and then not create an internal meta-data for it.

For now, if you have a single content mapping, setting the managed-id to false will be ok. If you have another one, then setting the managed id to false will mean that the un-marshalling will get messed up.

I have created Jira issue CMP-367, and I will fix it.
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Question about managed-id
Posted: Jan 30, 2007 1:47 AM   in response to: Shay Banon in response to: Shay Banon
Correct
  Click to reply to this thread Reply
I have fixed this issue. It should be available soon as part of the GA SNAPSHOT.
msolnit

Posts: 108
Registered: 10/12/06
Re: Question about managed-id
Posted: Jan 30, 2007 10:48 AM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Thanks very much!

-- Matt
Legend
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