]
Emmanuel Bernard resolved HSEARCH-181.
--------------------------------------
Resolution: Fixed
Better management of file-based index directories (Sanne Grinovero)
-------------------------------------------------------------------
Key: HSEARCH-181
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-181
Project: Hibernate Search
Issue Type: Improvement
Components: directory provider
Reporter: Sanne Grinovero
Assignee: Sanne Grinovero
Priority: Minor
Fix For: 3.1.0
Attachments: HSEARCH-181-preview.patch, HSEARCH-181-reviewed.patch,
HSEARCH-181-second-review-unifiedformat.patch, HSEARCH-181-second-review.patch
The main reason to improve this is that many people get confused about the index not
being created if they are so nice to create the directory for H.Search;
The index is not created and no proper warning is logged.
There are some other minor improvements needed in FSDirectoryProvider,
FSMasterDirectoryProvider initialization and other code about creation of the index
directories;
* code duplication about mkdirs() (move to DirectoryProviderHelper).
* inconsistent exceptions (sometimes SearchException, sometimes HibernateException for
the same problem).
* Current code already contains some good TODO about checking if it's not a file.
* Lucene's current versions are able to determine if the index already exists or if a
new needs to be created, I would rely on it instead of trying to detect the current
state;
the flag currently used should be used to force creation.
* some people on the forums declared sub-dirs in their Index annotation, it works but
some checks are skipped (e.g. writability).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: