The processor can work before the query (might not support it), and after the query has been done. Compare to processor plugin base in the search api.

The UrlProcessorInterface should extend from the ProcessorInterface created in this issue
There should be multiple stages where processors can be added

  • pre_query
  • post_query
  • build

Comments

jurcello created an issue. See original summary.

jurcello’s picture

Issue summary: View changes
borisson_’s picture

Issue summary: View changes
Issue tags: +Novice
borisson_’s picture

Issue summary: View changes

We should create multiple interfaces for this.

There should be a ProcessorInterface and a ProcessorPluginBase that implements that interface. In the ProcessorInterface there should be a configureForm to edit settings in the UI.

We should also copy the settings from the search api processors where they have stages in the configuration of a Processor:

 *   stages = {
 *     "pre_query" = 0,
 *     "post_query" = 0,
 *     "pre_build" = 0,
 *     "post_build" = 0,
 *   }

Every stage of processor should implement the interface related to that stage (preQueryProcessorInterface, PreBuildProcessorInterface).

Processors can implement other Interfaces as well, see #2596359: Widget config: facet ordering for more information.

borisson_’s picture

Issue summary: View changes

In last night's weekly facet-hangout, we discussed this issue, this is the conclusion regarding the stages:

Stages:

  1. pre_query preQuery(): uses the query_type and the facetSource implementation to make sure the alteration to the query was added before the query is executed in the backend?
    Example: DepedencyProcessor
  2. post_query (postQuery() ?): uses the query results and can alter those results
    Example: ValueCallbackProcessor
  3. build (build() ): uses the results and can do alterations before the renderable array is created.
    Example: WeightProcessor
borisson_’s picture

Assigned: Unassigned » borisson_

  • borisson_ committed 80ee09e on 2588731-processors
    Issue #2588731: Add initial interface for processors
    
  • borisson_ committed 9f46003 on 2588731-processors
    Issue #2588731: Add initial interfaces for stages
    
  • borisson_ committed 9c16c3e on 2588731-processors
    Issue #2588731: Add stages in interface.
    
  • borisson_ committed e91344c on 2588731-processors
    Issue #2588731: Add Processor annotation
    
  • borisson_ committed df5d67f on 2588731-processors
    Issue #2588731: Add Plugin Manager for all processors.
    
  • borisson_ committed 69b20dd on 2588731-processors
    Issue #2588731 + #2596359: Fix for interfaces + use ProcessorPluginBase...

  • borisson_ committed 7636e94 on 2588731-processors
    Issue #2588731: be very strict about implementing the correct interface.
    

  • borisson_ committed 790f005 on 2588731-processors
    Issue #2588731: UrlProcessor is now a normal processor that implements...

  • borisson_ committed 7623ba8 on 8.x-1.x
    Issue #2588731: Interfaces for processors + add default widgetconfig...
borisson_’s picture

Assigned: borisson_ » Unassigned
Status: Active » Needs review

This is now done and the followups are now unblocked.

  • StryKaizer committed a950496 on 8.x-1.x
    Issue #2588731 - Implement more interface functions similar to searchapi...

borisson_’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.