Show warning when search index rebuild is required
When changes are made to the search configuration, a warning message with information on which entities to be reindexed would be helpfull.
To give meaningful warnings, we need to store search index related configuration for each entity. We can encode this information for an entity Ent as string by:
- constructing a list L of search fields that are explicitely defined for entity Ent (without searchfields inherited from super/subclasses), order by search field name
- for each search field sf in L add a string encoding of the analyzer an that is used for sf:
- A string encoding for analyzer an is the name of each analyzer component used within the definition of an including the arguments , but does not include the name of the analyzer, as a change in analyzer name should not trigger reindexing. In case of a dual analyzer (different analysis at query timeand indexing time), only use the analyzer definition applied at indexing time.
- Concatenate all values of the updated list L
We can store this string in the database for each entity, and add a check at application initialization, which updates this string in the daabase after checking.Submitted by Elmer van Chastelet on 17 April 2013 at 16:06