We're updating the issue view to help you get more done. 

Search 6 groundwork - Restore support for full-text filters

Description

The idea is to allow users to declare filters as part of the mapping, and then allow to enable filters on an already-built query to add predicates. Users can pass parameters to the filter when enabling it.

The filters could be as simple as callbacks taking some context as a parameter and adding predicates to it using a DSL.

Note we must also allow filters to specify routing keys (“shard identifiers”) to implement the equivalent of org.hibernate.search.filter.ShardSensitiveOnlyFilter; see also

We should think about the caching feature we have in Search 5: maybe it requires some backend-specific code, maybe it requires filters to be modeled as cacheable objects, ... and then maybe caching could be implemented exclusively at the backend level and potentially apply to every query, not just filters. See org.hibernate.search.util.impl.FilterCacheModeTypeHelper and its uses in particular.

For testing, see org/hibernate/search/v6poc/integrationtest/mapper/pojo/JavaBeanProgrammaticMappingRoutingIT.java:147

Environment

None

Status

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major