Dataspects

From FindAndLearn::Cookbook
Jump to: navigation, search

Disambiguation[edit source]

Entities keyworded Dataspects[edit source]

SystemComponent "Semantic MediaWiki"

Dataspects, Wiki


Dataspects Terms Mentioned In

Dataspects Domains:



Architecture[edit | edit source]

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

Default operation[edit | edit source]

Run system components[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

(Semantic) MediaWikis[edit | edit source]

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[edit | edit source]

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

Check[edit | edit source]

Neo4j[edit | edit source]

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

Elasticsearch[edit | edit source]

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

Test[edit | edit source]

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

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