Smalyshev added a comment.

  Current implementation slightly modifies the model above, namely:
  
  - There is an interface `SearchIndexField` which has `public function 
getMapping( SearchEngine $engine )`. This is the main way how the search engine 
mapper gets the concrete mapping.
  - The interface also allows to set flags on the field, but not much more.
  - The concrete objects for field mappings are produced by the search engine 
via `SearchEngine::makeSearchFieldMapping( $name, $type )` if they are of 
standard types listed in or can be generated by extension or content handler 
from local classes that may do whatever they like as long as they implement 
`SearchIndexField`
  - There's standard class `SearchIndexFieldDefinition` that provides some 
tools for defining concrete search fields. Search engine extends this class to 
provide specific mappings.
  - There's `NullIndexField` class which any implementation can use to produce 
a field that will be ignored in final mapping. This is introduced to make code 
easier.
  - Significant part of text extraction for search indexing is moved from 
`CirrusSearch` to `WikitextContent`.
  - Content for indexing comes from `Content::getFieldsForSearchIndex( Title 
$title )`.
  - Hook `SearchFieldsForIndex` allows extensions to supply fields data in 
addition to `getFieldsForSearchIndex`.
  - Support for nested fields TBD, but should not be hard.
  
  Open questions:
  
  - Indexing now requires WikiPage object. It is unclear what is relationship 
between WikiPage, Title, ParserOutput etc. and which revision is actually 
getting indexed. This needs to be clarified and especially the fact that 
Content objects right now don't know which page they belong to but parsing the 
content actually needs the page so we need to resort to somewhat weird code.
  - Which hooks we will need and where?
  - No support for multilingual fields yet.

TASK DETAIL
  https://phabricator.wikimedia.org/T89733

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Smalyshev
Cc: gerritbot, EBernhardson, DannyH, hoo, Deskana, RobLa-WMF, Tgr, Yurik, 
dcausse, JanZerebecki, Smalyshev, matthiasmullie, aude, Ricordisamoa, Krenair, 
MZMcBride, bd808, brion, Manybubbles, Aklapper, daniel, Lewizho99, Maathavan, 
D3r1ck01, Izno, Luke081515, Wikidata-bugs, GWicke, jayvdb, fbstj, Jackmcbarn, 
Mbch331, Jay8g, Ltrlg, Legoktm



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to