CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Search\TextIndexField Class Reference
+ Inheritance diagram for CirrusSearch\Search\TextIndexField:
+ Collaboration diagram for CirrusSearch\Search\TextIndexField:

Public Member Functions

 __construct ( $name, $type, SearchConfig $config, $extra=[])
 
 setTextOptions ( $options)
 Set text options for this field if non-default.
 
- Public Member Functions inherited from CirrusSearch\Search\CirrusIndexField
 __construct ( $name, $type, SearchConfig $config)
 
 setMappingFlags ( $flags)
 Set flags for specific mapping.
 
 getMapping (SearchEngine $engine)
 Get mapping for specific search engine.
 

Static Public Member Functions

static getSimilarity (SearchConfig $config, $field, $analyzer=null)
 Get the field similarity.
 
- Static Public Member Functions inherited from CirrusSearch\Search\CirrusIndexField
static addIndexingHints (Document $doc, $fieldName, array $hints)
 Inspect SearchIndexField::getEngineHints() for indexing hints and forward them to special metadata in the document.
 
static addNoopHandler (\Elastica\Param $doc, $field, $handler)
 Add a special metadata to $doc to control the noop_script.
 
static getHint (\Elastica\Param $doc, $hint)
 Get the hint named $hint.
 
static setHint (\Elastica\Param $doc, $hint, $value)
 Set the hint named $hint.
 
static resetHints (Param $doc)
 Clear all hints.
 

Public Attributes

const POSITION_INCREMENT_GAP = 10
 Distance that lucene places between multiple values of the same field.
 
const ENABLE_NORMS = 0x1000000
 
const COPY_TO_SUGGEST = 0x2000000
 
const SPEED_UP_HIGHLIGHTING = 0x4000000
 
const SUPPORT_REGEX = 0x8000000
 
const STRING_FIELD_MASK = 0xFFFFFF
 
- Public Attributes inherited from CirrusSearch\Search\CirrusIndexField
const DOC_HINT_PARAM = '_cirrus_hints'
 Name of the param on \Elastica\Document that contains hints about the noop_script handlers.
 
const MULTILIST_HANDLER = 'multilist'
 name of the noop handler for multilist
 
const MULTILIST_DELETE_GROUPING = '__DELETE_GROUPING__'
 magic word to instruct the noop plugin to cleanup a particular multilist group
 
const NOOP_HINT = 'noop'
 Name of the hint as returned by SearchIndexField::getEngineHints()
 

Protected Member Functions

 getTextOptions ( $mappingFlags)
 Get text options for this field.
 
 configureHighlighting (array &$field, array $subFields, $rootField=true)
 Adapt the field options according to the highlighter used.
 
 initFlags ()
 Init the field flags.
 

Protected Attributes

 $extra
 
 $typeName = 'text'
 
 $allowTrigrams = false
 
- Protected Attributes inherited from CirrusSearch\Search\CirrusIndexField
 $typeName = 'unknown'
 
 $config
 
 $mappingFlags
 

Member Function Documentation

◆ configureHighlighting()

CirrusSearch\Search\TextIndexField::configureHighlighting ( array & $field,
array $subFields,
$rootField = true )
protected

Adapt the field options according to the highlighter used.

Parameters
mixed[]&$fieldthe mapping options being built
string[]$subFieldslist of subfields to configure
bool$rootFieldconfigure the root field (defaults to true)

◆ getSimilarity()

static CirrusSearch\Search\TextIndexField::getSimilarity ( SearchConfig $config,
$field,
$analyzer = null )
static

Get the field similarity.

Parameters
SearchConfig$config
string$field
string | null$analyzer
Returns
string

◆ getTextOptions()

CirrusSearch\Search\TextIndexField::getTextOptions ( $mappingFlags)
protected

Get text options for this field.

Parameters
int$mappingFlags
Returns
int

Reimplemented in CirrusSearch\Search\OpeningTextIndexField.

◆ setTextOptions()

CirrusSearch\Search\TextIndexField::setTextOptions ( $options)

Set text options for this field if non-default.

Parameters
int$options
Returns
self

Member Data Documentation

◆ POSITION_INCREMENT_GAP

const CirrusSearch\Search\TextIndexField::POSITION_INCREMENT_GAP = 10

Distance that lucene places between multiple values of the same field.

Set pretty high to prevent accidental phrase queries between those values.


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