jmix
jmix copied to clipboard
Support dynamic attributes in Search add-on
We have two options here:
- Implement dynamic attributes support in Search add-on
- Provide a sample that demonstrates how to hook into indexing and searching in order to support dynamic attributes at project level
Forum topic: https://forum.jmix.io/t/dynamic-attributes-in-elasticsearch-index/1316/6
Depends on #3218
Test cases:
- There are no "Dynamic Attributes add-on", but there is "Search add-on" 1.2. There are no configured indexes for "Search add-on" 1.3. There is search indexes but @DynamicAttributes annotation is not used 1.4. There is search indexes but @DynamicAttributes annotation is used(the annoation should be ignored with a message in the console log) 1.5 Perform ElasticSearch and OpenSearch smoke test
All following tests are with "Dynamic Attributes add-on" included to the project
- There is @DynamicAttributes in the index but the entity of the index haven't any dynamic attributes.
- There is @DynamicAttributes in the index. The entity of the index has some dynamic attributes categories. But this entity haven't any dynamic attributes.
- Checking declarative attributes configuration options
- Checking programmatic configuration options 5.1. Different options of ReferenceFieldsIndexingMode check(INSTANCE_NAME_ONLY, NONE) 5.2. Different options of ReferenceFieldsIndexingMode check(INSTANCE_NAME_ONLY, NONE)
- All the supported attribute types check
- Dynamic attriubute type changing 7.1. Within the supported for indexing types 7.2. Changing from a supported type to a not supported type and vise-versa 7.3. Changing from a sigle value attribute to a collection attribute and vise-versa 7.4 Changing from a scalar attribute to a reference attibute and vise-versa
- Dynamic attributes that are reference attributes shouldn't be indexed
- Collection attributes should be indexed 9.1 There is a problem with the collection of the references that should be fixed in the issue https://github.com/jmix-framework/jmix/issues/4668
- Wilcards in the categories and attribute support(Options like "abc", "abc", "abc" and "abc*" are supprted. The option "*" is not supported)
- Not supported symbols check ("." and "+")
- The compbination of the @AutoMappedField и @DynamicAttributes on one method of the index definition check
- Entites indexing checks 13.1. Entity creation 13.2. Entity changing 13.3.1. Setting the empy value for a dynamic attribute 13.3.2. Changing value for a dynamic attribute 13.3.3. Setting value for a dynamic attribute with the empty value 13.4. Entity removing 13.4.1. Removing a directly indexed entity 13.4.1. Removing an entity that is indexed indirectly with the reference attribute
- Different types of primary key of directly indexed entity shoul be checked(composite primary key is not supported in this case)
- Reference attributes indexing regression 15.1 An entity that are changed without dynamic attributes 15.2. Reference attributes on different levels
- A new dynamic adding attribute and and index mapping synchronization
16.1. The synchronization when the application is restarted 16.2. The synchronization with the JMX console - A dynamic attribute schema changing and indexing 17.1. A dynamic attribute adding and and index mapping synchronization(ER. The index should work) 17.2. A dynamic attribute deleting and and index mapping synchronization(ER. The index shouldn't work)
- JMX concole operations check(regression)