Author: epbernard
Date: 2008-09-04 12:05:47 -0400 (Thu, 04 Sep 2008)
New Revision: 15154
Modified:
search/trunk/doc/reference/en/modules/query.xml
search/trunk/src/java/org/hibernate/search/annotations/CacheBitResults.java
search/trunk/src/java/org/hibernate/search/annotations/Store.java
search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
Log:
HSEARCH-256 remove CacheBitResults.YES as the option was useless
also fix documentation
Modified: search/trunk/doc/reference/en/modules/query.xml
===================================================================
--- search/trunk/doc/reference/en/modules/query.xml 2008-09-04 15:59:52 UTC (rev 15153)
+++ search/trunk/doc/reference/en/modules/query.xml 2008-09-04 16:05:47 UTC (rev 15154)
@@ -624,7 +624,7 @@
The hard reference count can be adjusted using
<literal>hibernate.search.filter.cache_bit_results.size</literal>
(defaults to 5). The wrapping behaviour can be controlled by
- <literal>(a)FullTextFilterDef.cacheBitResult</literal>. There are three
+ <literal>(a)FullTextFilterDef.cacheBitResult</literal>. There are two
differerent values for this parameter:</para>
<para><informaltable align="left" width="">
@@ -641,30 +641,22 @@
<tbody>
<row>
- <entry align="left">CacheBitSet.AUTOMATIC</entry>
+ <entry
align="left">CacheBitResults.AUTOMATIC</entry>
<entry>The use of
<classname>CachingWrapperFilter</classname>
depends on the <literal>cache</literal> paramter of the filter
defintion. If <literal>cache</literal> is set to
<literal>true</literal> a wrapper will be used, otherwise not.
- <literal>CacheBitSet.AUTOMATIC</literal> is the default
+ <literal>CacheBitResults.AUTOMATIC</literal> is the default
value.</entry>
</row>
<row>
- <entry align="left">CacheBitSet.NO</entry>
+ <entry align="left">CacheBitResults.NO</entry>
<entry>No wrapper will be used.</entry>
</row>
- <row>
- <entry align="left">CacheBitSet.YES</entry>
-
- <entry>The specified filter will be wrapped independent of the
- <literal>cache</literal> flag. (Note, this options is quite
- meaningless, because even though the BitSet will be cached there
- is currently no way to reuse the fitler.)</entry>
- </row>
</tbody>
</tgroup>
</informaltable>Last but not least - why should filters be cached? There
Modified: search/trunk/src/java/org/hibernate/search/annotations/CacheBitResults.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/annotations/CacheBitResults.java 2008-09-04
15:59:52 UTC (rev 15153)
+++ search/trunk/src/java/org/hibernate/search/annotations/CacheBitResults.java 2008-09-04
16:05:47 UTC (rev 15154)
@@ -16,10 +16,6 @@
*/
AUTOMATIC,
- /**
- * The filters <code>BitSet</code> will be cached.
- */
- YES,
/**
* No caching of the filter's <code>BitSet</code>.
Modified: search/trunk/src/java/org/hibernate/search/annotations/Store.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/annotations/Store.java 2008-09-04 15:59:52
UTC (rev 15153)
+++ search/trunk/src/java/org/hibernate/search/annotations/Store.java 2008-09-04 16:05:47
UTC (rev 15154)
@@ -7,7 +7,10 @@
* @author Emmanuel Bernard
*/
public enum Store {
+ /** does not store the value in the index */
NO,
+ /** stores the value in the index */
YES,
+ /** stores the value in the index in a compressed form */
COMPRESS
}
Modified: search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-09-04
15:59:52 UTC (rev 15153)
+++ search/trunk/src/java/org/hibernate/search/query/FullTextQueryImpl.java 2008-09-04
16:05:47 UTC (rev 15154)
@@ -409,9 +409,7 @@
* <code>def</code>.
*/
private Filter addCachingWrapperFilter(Filter filter, FilterDef def) {
- if (def.getUseCachingWrapperFilter() == CacheBitResults.YES
- || (def.getUseCachingWrapperFilter() == CacheBitResults.AUTOMATIC && def
- .isCache())) {
+ if (def.getUseCachingWrapperFilter() == CacheBitResults.AUTOMATIC &&
def.isCache() ) {
int cachingWrapperFilterSize =
getSearchFactoryImplementor().getFilterCacheBitResultsSize();
filter = new org.hibernate.search.filter.CachingWrapperFilter(filter,
cachingWrapperFilterSize);
}