[MAGNOLIA-3095] Make info.magnolia.cms.core.search.SearchFactory implementation configurable Created: 21/Feb/10  Updated: 23/Jan/13  Resolved: 22/Feb/10

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3

Type: Improvement Priority: Major
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

at the moment there is no way to configure a custom SearchFactory/QueryManager implementation, query manager is instantiated in a static method of a non-configurable class:

public final class SearchFactory {
    public static QueryManager getAccessControllableQueryManager(javax.jcr.query.QueryManager queryManager,
            HierarchyManager hm) {
        return (new QueryManagerImpl(queryManager, hm));
    }
}

I propose to turn SearchFactory into an interface, configure it in mgnl-beans and move the current code to a DefaultSearchFactory



 Comments   
Comment by Fabrizio Giustina [ 22/Feb/10 ]

done for 4.3. Also changed a few fields/methods from private to protected for easier subclassing.

(FYI I am working to an alternative implementation in order to add some jackrabbit feature we actually don't support like scoring, excerpts, spell checker, paging - but it will not be ready for 4.3)

Generated at Mon Feb 12 03:43:08 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.