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

Key: CMP-906
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Stefan Fussenegger
Votes: 0
Watchers: 0
Operations

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

Reuse indexPath from FSDirectoyStore for LockFactory

Created: 16/Nov/09 09:38 AM   Updated: 04/Dec/09 03:46 AM
Component/s: None
Affects Version/s: 2.2.0 GA
Fix Version/s: 2.3.0 beta1

File Attachments: 1. Text File DefaultLuceneSearchEngineStore.patch (3 kB)



 Description  « Hide
I've just tried to create a custom DirectoryStore based on FSDirectoryStore (using a random temporary directory: For a compass.engine.connection of "tmp://path/to/index" I create something like /tmp/tmp-index-4711/path/to/index by overwriting findIndexPath(String)).

The only thing that didn't work out of the box was the path used for locking: a directory called tmp:/path/to/index would be created in the current working directory, e.g. /opt/myapp/index/tmp:/path/to/index.

All that's needed to fix this is changing a few lines in DefaultLuceneSearchEngineStore (see attached patch). All it does is reusing FSDirectoryStore.buildPath(String, String) instead of duplicating this code. However, this code currently only changes behavior for FSDirectoryStore. Additionally, a simple interface defining buildPath(String, String) could be created to let other DirectoryStores use native and simplefs locking with a customizable path.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 04/Dec/09 03:46 AM
For now I put your patch in place. I agree, a more generic way to do that is needed.