FilterManagerBundle
FilterManagerBundle copied to clipboard
Filter manager could use document properties instead of real field names
After testing filter manager bundle in user role I got an idea. Each field
in configuration should be document property but not plain Elasticsearch field name. I think this would be quite simple to implement because user does not interact with filter manager using fields in runtime. Only in configuration, so implementation would not add any overhead.
@saimaz @murnieza what do you think? If we see "properties only" as our long-term goal, we should get started.
Eventually, would be really good to get rid of using elasticsearch type fields. In this particular example, I don't think is very difficult to introduce the usage of Document
class properties.
IMO we should rethink about all configuration structure before a major release. Since elasticsearch doesn't support any more multiple repositories in a single instance we could simplify configuration in filter manager.
OK, after some deeper investigations I see that this is not that easy. Filter itself is not associated with any document (needs document to resolve field name). It is only indirectly associated on runtime while building search query. Currently it would be hardly possible to resolve that association without big architecture changes.