Skip to content

Instantly share code, notes, and snippets.

@jmchambers
Created September 6, 2011 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmchambers/1196986 to your computer and use it in GitHub Desktop.
Save jmchambers/1196986 to your computer and use it in GitHub Desktop.
test for es nested term count bug
#!/usr/bin/env sh
curl -XPOST 'http://localhost:9200/triple_store' -d '
{
"settings": {
"number_of_shards": 5,
"number_of_replicas": 0
},
"mappings": {
"entity" : {
"properties": {
"url": {
"index": "not_analyzed",
"type": "string"
},
"predicates": {
"properties": {
"type": {
"index": "not_analyzed",
"type": "string"
},
"string_value": {
"index": "not_analyzed",
"type": "string"
}
},
"type": "nested"
}
}
}
}
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/bef68423b43f4eddb92cb659f1a1abf8' -d '
{
"_id" : "bef68423b43f4eddb92cb659f1a1abf8",
"url": "http://dbpedia.org/resource/Alan_Shearer",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Alan Shearer"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/512a2c022f0b4e3daa341e6c8bcf6c2f' -d '
{
"_id" : "512a2c022f0b4e3daa341e6c8bcf6c2f",
"url": "http://dbpedia.org/resource/Alan_Shepard",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Alan Shepard"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/e80042fb97ea40ab9ab474d3ea672fd4' -d '
{
"_id" : "e80042fb97ea40ab9ab474d3ea672fd4",
"url": "http://dbpedia.org/resource/Alan_Turing",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Alan Turing"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/db3c2bc5f1d64d9c81ae58edbfabd57b' -d '
{
"_id" : "db3c2bc5f1d64d9c81ae58edbfabd57b",
"url": "http://dbpedia.org/resource/Alanis_Morissette",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Alanis Morissette"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/63fa9426d3dd435fa4e0c751320cf1f8' -d '
{
"_id" : "63fa9426d3dd435fa4e0c751320cf1f8",
"url": "http://dbpedia.org/resource/Alaric_I",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Alaric I"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/4a62cde76764482ba19b9b4ac9735678' -d '
{
"_id" : "4a62cde76764482ba19b9b4ac9735678",
"url": "http://dbpedia.org/resource/Alastair_Reynolds",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Alastair Reynolds"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/4e234be8c31d486784d93ab88107f053' -d '
{
"_id" : "4e234be8c31d486784d93ab88107f053",
"url": "http://dbpedia.org/resource/Albert,_Prince_Consort",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Albert, Prince Consort"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/87cb0279ddc947f886659d3f53df2222' -d '
{
"_id" : "87cb0279ddc947f886659d3f53df2222",
"url": "http://dbpedia.org/resource/Albert_Brooks",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Albert Brooks"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/653b106c0a374280a3a282acb3ee9e5a' -d '
{
"_id" : "653b106c0a374280a3a282acb3ee9e5a",
"url": "http://dbpedia.org/resource/Albert_Brudzewski",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Albert Brudzewski"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/a7d296ca34024407baa36ea3770ecad0' -d '
{
"_id" : "a7d296ca34024407baa36ea3770ecad0",
"url": "http://dbpedia.org/resource/Albert_Camus",
"predicates": [
{
"type": "type",
"string_value": ["thing", "person"]
}, {
"type": "label",
"string_value": ["Albert Camus"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/d2882b572ba74acd947cc969ba9cde61' -d '
{
"_id" : "d2882b572ba74acd947cc969ba9cde61",
"url": "http://dbpedia.org/resource/Twin_Peaks",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Twin Peaks"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/1c5ae75d49e64bda8471886ac291e969' -d '
{
"_id" : "1c5ae75d49e64bda8471886ac291e969",
"url": "http://dbpedia.org/resource/Up_Pompeii",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Up Pompeii"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/dd7c6b54faa94bdca1c3b2933ef2aaad' -d '
{
"_id" : "dd7c6b54faa94bdca1c3b2933ef2aaad",
"url": "http://dbpedia.org/resource/Wallace_and_Gromit",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Wallace and Gromit"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/f64e823493f54f469df5abb1ae33fce4' -d '
{
"_id" : "f64e823493f54f469df5abb1ae33fce4",
"url": "http://dbpedia.org/resource/Whatever_Happened_to_the_Likely_Lads",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Whatever Happened to the Likely Lads"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/b632e1970b6647b1b4ba51f64dbf59d9' -d '
{
"_id" : "b632e1970b6647b1b4ba51f64dbf59d9",
"url": "http://dbpedia.org/resource/Who_Wants_to_Be_a_Millionaire",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Who Wants to Be a Millionaire"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/35f9baa9b3844c45b5520c384f57b844' -d '
{
"_id" : "35f9baa9b3844c45b5520c384f57b844",
"url": "http://dbpedia.org/resource/Whose_Line_Is_It_Anyway",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Whose Line Is It Anyway"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/b30d8a6ca1eb4f5d9e6c61d521794a10' -d '
{
"_id" : "b30d8a6ca1eb4f5d9e6c61d521794a10",
"url": "http://dbpedia.org/resource/Xena:_Warrior_Princess",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Xena: Warrior Princess"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/7d870fe9e46d4babaf41cae932791005' -d '
{
"_id" : "7d870fe9e46d4babaf41cae932791005",
"url": "http://dbpedia.org/resource/Yes_Minister",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Yes Minister"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/795a31d29d964390832c574d912b159e' -d '
{
"_id" : "795a31d29d964390832c574d912b159e",
"url": "http://dbpedia.org/resource/You_Cant_Do_That_on_Television",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["You Cant Do That on Television"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/ae6a2dc2b627498385dcbe7dce930e00' -d '
{
"_id" : "ae6a2dc2b627498385dcbe7dce930e00",
"url": "http://dbpedia.org/resource/Young_Talent_Time",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "tv show"]
}, {
"type": "label",
"string_value": ["Young Talent Time"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/68b8ebc72cd44f8b98f0ab020b0f1f60' -d '
{
"_id" : "68b8ebc72cd44f8b98f0ab020b0f1f60",
"url": "http://dbpedia.org/resource/Virtua_Fighter_arcade_game",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Virtua Fighter arcade game"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/6d46b63af9124fb99af2e5de504587c4' -d '
{
"_id" : "6d46b63af9124fb99af2e5de504587c4",
"url": "http://dbpedia.org/resource/Warcraft:_Orcs_&_Humans",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Warcraft: Orcs & Humans"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/1c615b3b23a94dfd9c2ef60d90a9454b' -d '
{
"_id" : "1c615b3b23a94dfd9c2ef60d90a9454b",
"url": "http://dbpedia.org/resource/Warcraft_III:_Reign_of_Chaos",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Warcraft III: Reign of Chaos"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/ab9778a94d8642fd944f317ba897ba23' -d '
{
"_id" : "ab9778a94d8642fd944f317ba897ba23",
"url": "http://dbpedia.org/resource/Wolfenstein_3D",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Wolfenstein 3D"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/921ccf328ee7402c89cb5b47b423036b' -d '
{
"_id" : "921ccf328ee7402c89cb5b47b423036b",
"url": "http://dbpedia.org/resource/Xenogears",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Xenogears"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/f03761a6b4f14ffc8a3c7e211468179a' -d '
{
"_id" : "f03761a6b4f14ffc8a3c7e211468179a",
"url": "http://dbpedia.org/resource/Yoshis_Story",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Yoshis Story"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/d4d168219732497fb21cf3c89e71236c' -d '
{
"_id" : "d4d168219732497fb21cf3c89e71236c",
"url": "http://dbpedia.org/resource/Zak_McKracken_and_the_Alien_Mindbenders",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Zak McKracken and the Alien Mindbenders"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/ca059cfc88d44283bb115f640f7b12b3' -d '
{
"_id" : "ca059cfc88d44283bb115f640f7b12b3",
"url": "http://dbpedia.org/resource/Zero_Wing",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Zero Wing"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/f4ba92cb83b04a879dc2189012c3ba1e' -d '
{
"_id" : "f4ba92cb83b04a879dc2189012c3ba1e",
"url": "http://dbpedia.org/resource/Zool",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Zool"]
}
]
}
';
curl -XPOST 'http://localhost:9200/triple_store/entity/4e4168806cd447d093eeea2683378b15' -d '
{
"_id" : "4e4168806cd447d093eeea2683378b15",
"url": "http://dbpedia.org/resource/Zoop",
"predicates": [
{
"type": "type",
"string_value": ["thing", "creative work", "video game"]
}, {
"type": "label",
"string_value": ["Zoop"]
}
]
}
';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment