See Release Notes
Long Term Support Release
Differences Between: [Versions 39 and 401]
Solr schema manipulation manager.
Copyright: | 2015 David Monllao {@link http://www.davidmonllao.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 349 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
schema:: (9 methods):
__construct()
can_setup_server()
setup()
validate_setup()
check_index()
add_fields()
validate_fields()
validate_add_field_result()
doc_field_to_solr_field()
__construct(engine $engine = null) X-Ref |
Constructor. param: engine $engine Optional engine parameter, if not specified then one will be created return: void |
can_setup_server() X-Ref |
Can setup be executed against the configured server. return: true|string True or error message. |
setup($checkexisting = true) X-Ref |
Setup solr stuff required by moodle. param: bool $checkexisting Whether to check if the fields already exist or not return: bool |
validate_setup() X-Ref |
Checks the schema is properly set up. return: void |
check_index() X-Ref |
Checks if the index is ready, triggers an exception otherwise. return: void |
add_fields($fields, $checkexisting = true) X-Ref |
Adds the provided fields to Solr schema. Intentionally separated from create(), it can be called to add extra fields. fields separately. param: array $fields \core_search\document::$requiredfields format param: bool $checkexisting Whether to check if the fields already exist or not return: bool |
validate_fields(&$fields, $requireexisting = false) X-Ref |
Checks if the schema existing fields are properly set, triggers an exception otherwise. param: array $fields param: bool $requireexisting Require the fields to exist, otherwise exception. return: void |
validate_add_field_result($result) X-Ref |
Checks that the field results do not contain errors. param: string $results curl response body return: void |
doc_field_to_solr_field($datatype) X-Ref |
Returns the solr field type from the document field type string. param: string $datatype return: string |