BenchmarkAnything::Storage::Backend::SQL::Search - searchengine support functions


Boolean true in JSON documents.


Boolean false in JSON documents.

sync_search_engine_classic ($or_sql, $b_force, $i_start, $i_bulkcount)

Sync in linear way.


The BenchmarkAnything::Storage::Backend::SQL instance.


Boolean. Re-sync without check if data already exist in index. Default false.


First element ID where to start. Default 1.


How many elements to read and index per bunch. Default 10000.

init_search_engine( $force )

Initializes the configured search engine (Elasticsearch). If the index already exists it does nothing, except when you set $force to a true value which deletes and re-creates the index. This is necessary for example to apply new type mappings.

After a successful (re-)init you need to run sync_search_engine.

During (re-init) and sync you should disable querying by setting

  searchengine.elasticsearch.enable_query: 0

sync_search_engine( $force, $start, $count)

Sync $count (default 10000) entries from the relational backend into the search engine (Elasticsearch) for indexing, beginning at $start (default 1). Already existing entries in Elasticsearch are skipped unless $force is set to a true value.


Roberto Schaefer <>


This software is Copyright (c) 2019 by, Inc. or its affiliates.

This is free software, licensed under:

  The (two-clause) FreeBSD License