Dataspects

From dataspects::Wiki
Jump to navigation Jump to search

Disambiguation

Entities keyworded Dataspects

SystemComponent "Semantic MediaWiki"

Dataspects, Wiki

 

Dataspects Terms Mentioned In

Dataspects Domains:



Architecture

https://mermaidjs.github.io/mermaid-live-editor

Default operation

Run system components

dataspectsSystems$ docker-compose up                      --> localhost:5601
dataspectsd$       go run main.go --c config.yml --p 3001
dataspects-ui$     nodemon                                --> localhost:3000
~$                 docker run ... neo4j                   --> localhost:7687

Configure a datastore

localhost:3000/datastores/mediawikis (Label = COFALNET)

You might want to empty an existing Elasticsearch index:

POST <INDEX_NAME>/_delete_by_query
{"query": {"match_all": {}}}

You might want to empty an existing Neo4j database:

MATCH (n)
DETACH DELETE n

SIGINT Config

http://localhost:3000/search/facet/general/ProvidesAction shows all available actions.

tasks:
  - name: <TASK_NAME>
    actions:
      # See type Actions struct in a ResourceSilo's action.go about what actions are available.

Check dataspectsd's log for indexing details including tasks and actions.

Index

(Semantic) MediaWikis

See main article Indexing (Semantic) MediaWikis

dataspecter$ go run main.go mw-ask \
               --mw-url https://cookbook.findandlearn.net/w/api.php \
               --mw-conditions Category:Entity \
               --id 4 \
               --url http://localhost:3001 \
               --key 45b966ce-3545-4a1d-96de-98bb1935997e
dataspecter$ go run main.go mw-namespace \
               --mw-namespace main \
               --mw-url https://cookbook.findandlearn.net/w/api.php \
               --id 4 \
               --url http://localhost:3001 \
               --key 45b966ce-3545-4a1d-96de-98bb1935997e

Code repositories

dataspecter$ go run main.go code-repo \
               --id 3 \
               --url http://localhost:3001 \
               --key a7afa361-e13e-422f-97cc-3e975b3a9d4e

Check

Neo4j

MATCH p=({originatedFromResourceSiloLabel: 'COFALNET'})-[r:HasInternalLink {originatedFromResourceSiloLabel: 'COFALNET'}]->({originatedFromResourceSiloLabel: 'COFALNET'})
RETURN p LIMIT 25

Elasticsearch

GET mediawiki_4/_search
{
  "query": {
    "term": {
      "OriginatedFromResourceSiloLabel.keyword": {
        "value": "COFALNET"
      }
    }
  }
}

Test

https://blog.alexellis.io/golang-writing-unit-tests/

dataspectsd/test$ clear; go test -v -count=1