Skip to content

Instantly share code, notes, and snippets.

View pandurx's full-sized avatar
😎
pushing and committing

Christine pandurx

😎
pushing and committing
  • Ottawa, Ontario
  • 05:59 (UTC -04:00)
View GitHub Profile
// api expose function calls
elgg_ws_expose_function(
'get.entity_list',
'get_entity_list',
[
'type' => [
'type' => 'string',
'required' => true,
'description' => 'the type of entity in string format',
],
import groovy.json.JsonSlurper
import groovy.json.JsonBuilder
// retrieve the json text from the api (elgg)
URL apiURL = new URL("http://192.168.1.18/gcconnex/services/api/rest/json/?method=get.entity_list&type=object&subtype=blog")
def slurper = new JsonSlurper()
def api_response = slurper.parseText(apiURL.text)
def results = api_response.result
@pandurx
pandurx / schema.xml
Created March 23, 2018 18:31
Elgg and Apache Solr 7 Integration
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="example" version="1.5">
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<!-- ElggEntity -->
<field name="type" type="string" indexed="true" stored="true" multiValued="false" />
@pandurx
pandurx / solrconfig.xml
Created March 23, 2018 18:30
Elgg and Apache Solr 7 Integration
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0