[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/search/engine/solr/classes/ -> schema.php (summary)

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: 310 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

schema:: (8 methods):
  __construct()
  can_setup_server()
  setup()
  validate_setup()
  check_index()
  add_fields()
  validate_fields()
  validate_add_field_result()


Class: schema  - X-Ref

Schema class to interact with Solr schema.

At the moment it only implements create which should be enough for a basic
moodle configuration in Solr.

__construct()   X-Ref
Constructor.

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



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1