Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Search\Fields\WikibaseIndexField Interface Reference

Each field is intended to be used by the search engine as an additional property of a page. More...

+ Inheritance diagram for Wikibase\Repo\Search\Fields\WikibaseIndexField:

Public Member Functions

 getMappingField (SearchEngine $engine, $name)
 Produce specific field mapping. More...
 
 getFieldData (EntityDocument $entity)
 

Detailed Description

Each field is intended to be used by the search engine as an additional property of a page.

The data returned by the field must match the field type defined in the mapping. (e.g. nested must be array, integer field must get an int, etc)

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Member Function Documentation

◆ getFieldData()

Wikibase\Repo\Search\Fields\WikibaseIndexField::getFieldData ( EntityDocument  $entity)
Parameters
EntityDocument$entity
Returns
mixed Get the value of the field to be indexed when a page/document is indexed. This might be an array with nested data, if the field is defined with nested type or an int or string for simple field types.

◆ getMappingField()

Wikibase\Repo\Search\Fields\WikibaseIndexField::getMappingField ( SearchEngine  $engine,
  $name 
)

Produce specific field mapping.

Parameters
SearchEngine$engine
string$name
Returns
\SearchIndexField|null Null if mapping is not supported

Implemented in Wikibase\Repo\Search\Fields\WikibaseNumericField.


The documentation for this interface was generated from the following file: