Actions

Difference between revisions of "Developer Area/Specifications in Development/Elasticsearch Plugin"

From Mahara Wiki

< Developer Area‎ | Specifications in Development
Line 3: Line 3:
 
=Elasticsearch PHP client=
 
=Elasticsearch PHP client=
 
[http://elastica.io Elastica] was chosen as the PHP client because at the time development was started, it was the only one.
 
[http://elastica.io Elastica] was chosen as the PHP client because at the time development was started, it was the only one.
2 other clients are now available ([http://www.elasticsearch.org/guide/clients/ see list])
+
2 other clients are now [http://www.elasticsearch.org/guide/clients/ available].
  
[[http://elastica.io/2013/02/20/release-v0-dot-20-dot-5-0/ Release v0.20.5.0]] is used, compatible with Elasticsearch 0.20
+
[http://elastica.io/2013/02/20/release-v0-dot-20-dot-5-0/ Release v0.20.5.0] is used, compatible with Elasticsearch 0.20
  
Ugrading to Elasticsearch 0.90 would require [[http://elastica.io/2013/06/07/release-v0-dot-90-dot-1-0/ Release v0.90.1.0]]
+
Ugrading to Elasticsearch 0.90 would require [http://elastica.io/2013/06/07/release-v0-dot-90-dot-1-0/ Release v0.90.1.0]
  
 
=Plugin administration=
 
=Plugin administration=

Revision as of 17:02, 25 June 2013

Developer's notes

Elasticsearch PHP client

Elastica was chosen as the PHP client because at the time development was started, it was the only one. 2 other clients are now available.

Release v0.20.5.0 is used, compatible with Elasticsearch 0.20

Ugrading to Elasticsearch 0.90 would require Release v0.90.1.0

Plugin administration

  • Elastic Search Types are table names (usr,interaction_instance,interaction_forum_post,view,group,artefact)
  • Everytime the settings are saved, the mapping of each type is updated, and the triggers on each table are dropped and re-created. MySQL is not supported at the moment. The functions in ESindexing need to be updated for MySQL.
  • Resetting a type inserts all the records of the related table into elasticsearch_queue.
  • Indexing is done on cron tun.

Indexing

Every time a record is inserted, updated or deleted in one of the selected table, a DB trigger inserts the id and type of that record into elasticsearch_queue.

The original idea was creating more hooks on the different types, but it would be more time consuming and complicated.