kanvas/social

Add social layout to your kanvas application.

Installs: 13 106

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 1

Open Issues: 3

Type:project

dev-master 2021-10-11 23:33 UTC

README

Latest Stable Version Total Downloads Latest Unstable Version Tests

Kanvas Social package , allows you to implement a social layer to any kanvas app.

What do we consider a social layer?

  • Follow Entity
  • User Interactions
  • Comment System
  • User Feeds
  • Group
  • Channels
  • Comment Interactions

Indexing Elastic Messages

To create a new index for messages use the following command:

php cli/cli.php social indexMessages

Erasing the messages index

In case you want you want to erase the messages index, in your terminal, execute the following:

 php cli/cli.php social eraseMessages

Elastic Configuration

Update total fields limit for message index

curl -s -XPUT https://{elastichost}/messages/_settings  -H 'Content-Type: application/json' -d '{"index.mapping.total_fields.limit": 100}'

Allow all object properties of a specific index to be nested , allowing use to use multi nested level query proper.index.property.index Example

{{URL}}/{{VERSION}}/messages?q=(chs.slug:test-uuid,rlmsg.activities_status.id:2)&format=true
curl -s -XPUT https://{elastichost}/_template/social_messages  -H 'Content-Type: application/json' -d '{
"index_patterns": [
    "message*"
  ],
  "mappings": {
      "dynamic_templates": [
        {
          "nested": {
            "match_mapping_type": "object",
            "mapping": {
              "type": "nested"
            }
          }
        }
      ]
  }
}'

Running Tests:

composer test