[TXTREC-72] Extract additional interface/API to tackle custom fields Created: 05/Sep/19  Updated: 15/May/20  Resolved: 13/May/20

Status: Closed
Project: Text Classification
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.1

Type: Story Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 3d 2.5h
Original Estimate: Not Specified

Attachments: Zip Archive hello-magnolia (1).zip    
Issue Links:
dependency
is depended upon by TXTREC-75 DOC: update text classification docs ... Closed
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)
Documentation update required:
Yes
Date of First Response:
Epic Link: Txt Classification
Sprint: Add-Ons 34, Add-Ons 37
Story Points: 5

 Description   

Currently, we have hardcoded field definitions in the PageAggregator but we should provide our users with an easy way to write some logic to achieve aggregation with their custom fields.

 

AC

  • Have an API to extract one field per class e.g. CompositeFieldAggregator
  • Each aggregator knows about the type(s) they can handle
  • Aggregators are multibinded and traversed over until one aggregator feels responsible to respond.


 Comments   
Comment by Evzen Fochr [ 13/May/20 ]

For piqa we used attached lightmodule

Comment by Oanh Thai Hoang [ 15/May/20 ]

For document note jlegendre:

There are no change configuration needed for https://documentation.magnolia-cms.com/display/DOCS62/Text+Classification+module#TextClassificationmodule-Definingfieldtypes.

But in case user has a custom field and wanna classify that field. He still need also configure his custom fieldType as below

aggregateDefinition:
  fieldTypes: [myCustomField] 

And user need also provide custom implementation for his custom field base on FieldExtractAggregator and register singleton component in module descriptors.

 
Example implementations for simple field, composite field, switchable field. And their singleton component registration to module descriptor

Generated at Mon Feb 12 11:05:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.