SilverStripe\Elastica\ElasticaUtil
Utility methods to help with searching functions, and also testable without fixtures.
Synopsis
class ElasticaUtil
{
- // members
- private static string $pre_marker = ' |PREZXCVBNM12345678';
- private static string $post_marker = 'POSTZXCVBNM12345678| ';
- private static bool $cli_printer_output = true;
- // methods
- public static void message()
- public static void showBooleanHumanReadable()
- public static void getPhraseSuggestion()
- public static array parseSuggestionExplanation()
- public static void addAutocompleteToQueryField()
- public static function getPrinter()
- public static void setPrinterOutput()
- public static bool getPrinterOutput()
Members
private
- $cli_printer_output — SilverStripe\Elastica\bool
-
$post_marker
Marker string for psot highlight - can be any string unlikely to appear in a search. -
$pre_marker
Marker string for pre highlight - can be any string unlikely to appear in a search.
Methods
public
- addAutocompleteToQueryField() — Add attributes necessary for jQuery to execute autocomplete.
- getPhraseSuggestion()
- getPrinter()
- getPrinterOutput() — Accessor to printer output variable. Needed for PHP 5.3 compliance
- message() — Function to display messages only if using the command line.
- parseSuggestionExplanation() — The output format of this function is not documented, so at best this is guess work to an extent. Possible formats are: - ((Title.standard:great Content.standard:ammunition Content.standard:could Content.standard:bair Content.standard:dancing Content.standard:column Content.standard:company Content.standard:infantry Content.standard:men Content.standard:soldier Content.standard:brigade Content.standard:zealand Content.standard:new)~3) -ConstantScore(_uid:GutenbergBookExtract#1519) (Description: bay Description: mannerstram).
- setPrinterOutput() — Set to true to show output on the command line or browser, false to not.
- showBooleanHumanReadable()