QueryOptions
in package
Table of Contents
Properties
- $options : array<string|int, mixed>
Methods
- getOptions() : array<string|int, mixed>
- Retrieve all options as an array.
- highlight() : self
- Add highlighting to the query results.
- inFields() : self
- inKeys() : self
- noContent() : self
- Exclude content from the query results (return only metadata).
- noStopWords() : self
- returnFields() : self
- Return specific fields from the query results.
- setExpander() : self
- setLanguage() : self
- setPayload() : self
- setScorer() : self
- setSlop() : self
- summarize() : self
- Add summarization to the query results.
- verbatim() : self
- withScores() : self
- Include scores in the query results.
Properties
$options
private
array<string|int, mixed>
$options
= []
Methods
getOptions()
Retrieve all options as an array.
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>highlight()
Add highlighting to the query results.
public
highlight(array<string|int, mixed> $fields[, string $openTag = '<strong>' ][, string $closeTag = '</strong>' ]) : self
Parameters
- $fields : array<string|int, mixed>
-
The fields to highlight.
- $openTag : string = '<strong>'
-
The opening HTML tag for highlights.
- $closeTag : string = '</strong>'
-
The closing HTML tag for highlights.
Return values
selfinFields()
public
inFields(array<string|int, mixed> $fields) : self
Parameters
- $fields : array<string|int, mixed>
Return values
selfinKeys()
public
inKeys(array<string|int, mixed> $keys) : self
Parameters
- $keys : array<string|int, mixed>
Return values
selfnoContent()
Exclude content from the query results (return only metadata).
public
noContent() : self
Return values
selfnoStopWords()
public
noStopWords() : self
Return values
selfreturnFields()
Return specific fields from the query results.
public
returnFields(array<string|int, mixed> $fields) : self
Parameters
- $fields : array<string|int, mixed>
-
The list of fields to return.
Return values
selfsetExpander()
public
setExpander(string $expander) : self
Parameters
- $expander : string
Return values
selfsetLanguage()
public
setLanguage(string $language) : self
Parameters
- $language : string
Return values
selfsetPayload()
public
setPayload(string $payload) : self
Parameters
- $payload : string
Return values
selfsetScorer()
public
setScorer(string $scorer) : self
Parameters
- $scorer : string
Return values
selfsetSlop()
public
setSlop(int $slop) : self
Parameters
- $slop : int
Return values
selfsummarize()
Add summarization to the query results.
public
summarize(array<string|int, mixed> $fields[, int $fragmentCount = 3 ][, int $fragmentLength = 50 ][, string $separator = '...' ]) : self
Parameters
- $fields : array<string|int, mixed>
-
The fields to summarize.
- $fragmentCount : int = 3
-
Number of fragments to return.
- $fragmentLength : int = 50
-
Maximum length of each fragment.
- $separator : string = '...'
-
Separator used between fragments.
Return values
selfverbatim()
public
verbatim() : self
Return values
selfwithScores()
Include scores in the query results.
public
withScores() : self