On Fri, 14 Jan 2011 14:24:07 +0100, Emmanuel Bernard
<emmanuel(a)hibernate.org> wrote:
>> * SearchFactory.enableIndexing(boolean) // enables/disables
globally on
>> the fly
>> could operate on existing boolean
>> org.hibernate.search.event.FullTextIndexEventListener.used
>
> +1 This is something I was wishing for some time back. It should be easy
> to implement as well. This option should then also be exposed via JMX.
What's the use case behind it?
I think it would allow for application which are completely manageable via
some user interface. At the moment you set the auto indexing option or not.
If I could programmatically change it I could do things like stop
auto indexing, do db modifications, purge the index, re-index, enable
event indexing.
>> * entity controlled, via an annotated boolean property
>> I'd mandate a boolean property, or something which can be easily
>> evaluated via a SQL fragment / Criteria / filterable, so that the same
>> information could be reused
>> by the MassIndexer when picking all values to be indexed.
>
> Not sure I understand exactly what you mean.
@Entity @Indexed
public class MyEntity {
...
@SkipIndexing
boolean isIndexed() {
return status == TEMP;
}
}
Wouldn't the other solution be more generic?
--Hardy