Move some of SearchIntegrator from spi to impl (and move SPI level contracts up)

Description

None

Activity

Show:

Yoann Rodière November 13, 2018 at 8:20 AM

SearchIntegrator no longer exists in Search 6. Closing as out of date.

To get information about a particular mapping, backend or index manager at runtime, there is a SearchIntegration contract. But this contract is mostly aimed at integrators (Infinispan integration, ORM integration).

For other information, we try to pass the information to SPIs when they are built, rather than offering access to a central object at runtime that exposes multiple getters. See org.hibernate.search.engine.mapper.mapping.building.spi.MappingInitiator#configure where we pass a org.hibernate.search.engine.mapper.mapping.spi.MappingBuildContext, or org.hibernate.search.engine.mapper.mapping.building.spi.Mapper#addIndexed where we pass a org.hibernate.search.engine.mapper.mapping.building.spi.IndexManagerBuildingState that will ultimately allow to retrieve a org.hibernate.search.engine.mapper.mapping.spi.MappedIndexManager.

The idea is to make the flow of information part of the design of the bootstrapping process; that helps to keep the different "parts" of Hibernate Search more or less decoupled.
I'm not entirely sure we'll be able to do it this way forever, especially once we cannot break APIs anymore. But the fact that a lot of the code is either SPI or implementation, not API, might help.

Emmanuel Bernard December 8, 2011 at 4:57 PM

The interface won't go away, just move to private.
I'm fine either way. It's probably a good move.

Emmanuel Bernard July 4, 2011 at 4:33 PM

o SearchFactoryIntegrator vs SearchFactoryImplementor
In my mind, I introduced SearchFactoryIntegrator to separate private SearchFactory usage from frameworks usage.
Does the Infinispan Query module depends on SearchFactoryImplementor only? Or is it depending on SearchFactoryImplementor?

=> Sanne
It's built on top of SearchFactoryIntegrator, in some tests this is
cast to SearchFactoryImplementor to be able to verify some state but I
think you can ignore that.
Currently Query needs only #getDocumentBuildersIndexedEntities(), in
worst case we could expose that.
=> Hardy
If SearchFactoryImplementor could disappear and have one less interface, I'm +1

Out of Date

Details

Assignee

Reporter

Components

Sprint

Priority

Created July 4, 2011 at 4:29 PM
Updated November 13, 2018 at 8:20 AM
Resolved November 13, 2018 at 8:20 AM