SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-703
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Kjersti B Berg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

Allow compass to be configured to index object instances multiple times for the same root.

Created: 04/Sep/08 08:07 AM   Updated: 09/Sep/08 05:46 PM
Component/s: Compass::Core
Affects Version/s: None
Fix Version/s: 2.1.0 M3

File Attachments: 1. Text File patch.txt (1 kB)



 Description  « Hide
This issue is only relevant when using Compass internal ids for searching, dotted syntax. Eg: Alias.component.property:value.

When more than one object instance is referenced in an object graph, compass will only index it once. That means that if you want to search using the dotted notation, you might not get the results you expect. An example:

Given a class Client, with component ZipCode and component Property, and that class Property also has a component ZipCode. If the client references the same ZipCode instance as its property, then you are not able to search for Client.property.zipCode, because Compass will only index the id when it hits the zip code the second time around. The attached patch does not cache object instances, and therefore fixes this problem. Could there be a configuration option to allow this behaviour?

See discussion in this forum thread: http://forum.compass-project.org/thread.jspa?messageID=295983&tstart=0



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 09/Sep/08 05:46 PM
Fixed.

I thought about this a bit, and it actually make sense to have this behavior the default one. There is a global setting called compass.osem.filterDuplicates. The default value is false, but it can be set to true to revert back to the old behavior. Filtering duplicates can also be done on a class mapping level.