superfastmatch
superfastmatch copied to clipboard
Duplicate associations from multiple association tasks
Each time the association task is run it duplicates previously-found associations. Below is an example of 2 associations from 2 association tasks, but it seems to go on without limit.
$ curl --data-urlencode "title=Lorem ipsum" --data-urlencode "text@/tmp/loremipsum.txt" http://localhost:8080/document/1/1/
{"id":"513117167da2803b40000001","command":"Add Document","source":null,"target":{"doctype":1,"docid":1},"sourceRange":"","targetRange":"","status":"Queued","error":"","success":true}
$ curl http://localhost:8080/document/1/1/ | python -m json.tool
{
"characters": 57,
"id": {
"docid": 1,
"doctype": 1
},
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n",
"title": "Lorem ipsum",
"valid": true
}
$ curl -XPOST http://localhost:8080/association/1/1/
{"id":"513117217da2803b40000002","command":"Associate Document","source":null,"target":null,"sourceRange":"1","targetRange":"1","status":"Queued","error":"","success":true}
$ curl http://localhost:8080/document/1/1/ | python -m json.tool
{
"associations": {
"Documents": [
{
"characters": 57,
"fragment_count": 1,
"fragments": [
[
0,
0,
55,
239133750739
]
],
"id": {
"docid": 1,
"doctype": 1
},
"title": "Lorem ipsum",
"valid": true
}
],
"Meta": {}
},
"characters": 57,
"id": {
"docid": 1,
"doctype": 1
},
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n",
"title": "Lorem ipsum",
"valid": true
}
$ curl -XPOST http://localhost:8080/association/1/1/
{"id":"513117267da2803b40000003","command":"Associate Document","source":null,"target":null,"sourceRange":"1","targetRange":"1","status":"Queued","error":"","success":true}
$ curl http://localhost:8080/document/1/1/ | python -m json.tool
{
"associations": {
"Documents": [
{
"characters": 57,
"fragment_count": 1,
"fragments": [
[
0,
0,
55,
239133750739
]
],
"id": {
"docid": 1,
"doctype": 1
},
"title": "Lorem ipsum",
"valid": true
},
{
"characters": 57,
"fragment_count": 1,
"fragments": [
[
0,
0,
55,
239133750739
]
],
"id": {
"docid": 1,
"doctype": 1
},
"title": "Lorem ipsum",
"valid": true
}
],
"Meta": {}
},
"characters": 57,
"id": {
"docid": 1,
"doctype": 1
},
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n",
"title": "Lorem ipsum",
"valid": true
}