{"id":33840,"date":"2023-02-14T14:37:53","date_gmt":"2023-02-14T09:07:53","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/"},"modified":"2023-02-14T14:37:53","modified_gmt":"2023-02-14T09:07:53","slug":"solved-what-is-with-indices-in-allegrograph","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/","title":{"rendered":"[Solved] What is &#8211;with-indices in AllegroGraph"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-27300636\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"27300636\" data-parentid=\"27173529\" data-score=\"1\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>Your triple store contains triples <code>spo<\/code> (subject, predicate, object). A query against a graph so stored may have to traverse a lot of the graph to find nodes that match your query. AllegroGraph can store indices that make that traversal faster: finding all predicates that match first, for example, and the subject and object nodes that are attached, it can use an index that finds the predicates first <code>pso<\/code>. If your triples have named graphs you can add <code>g<\/code> and, all your triples have ids <code>i<\/code>. So AG can use an index <code>psogi<\/code>. (From the docs: <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/franz.com\/agraph\/support\/documentation\/current\/triple-index.html\">AllegroGraph Triple Indices<\/a>)<\/p>\n<p>An AG triple store is created with a default set of indices. Generating specialized indices is resource intensive, but if you know what kinds of queries you&#8217;re going to be getting, you may find it worthwhile to specify the appropriate indices to optimize response times.<\/p>\n<p>If you&#8217;re loading from the command line:<\/p>\n<blockquote>\n<p>The following example loads a single file into AllegroGraph.<\/p>\n<p>.\/agload &#8211;with-indices &#8220;ospgi,posgi,spogi&#8221;<br \/>\n  The triple store will generate three triple indices: ospgi, posgi and spogi.<\/p>\n<\/blockquote>\n<p>(from the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/franz.com\/agraph\/support\/documentation\/current\/agload.html\">docs for <code>agload<\/code><\/a>)<\/p>\n<p>if you&#8217;re using the REST interface, you can create your repositories with specified indices:<\/p>\n<blockquote>\n<p>PUT \/repositories\/[name]<\/p>\n<\/blockquote>\n<p>with the parameter <code>index<\/code>:<\/p>\n<blockquote>\n<p>index<br \/>\n     Can be specified any number of times. Should hold index IDs, and<br \/>\n     is used to configure the set of indices created for the store.<\/p>\n<\/blockquote>\n<p>(from the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/franz.com\/agraph\/support\/documentation\/current\/http-protocol.html#put-repo\">docs for <code>put repo<\/code><\/a>)<\/p>\n<p>Or you can load your triples and then do:<\/p>\n<blockquote>\n<p>PUT \/repositories\/[name]\/indices\/[type] Ensures that the index<br \/>\n  indicated by type is present in this store. Takes effect at commit<br \/>\n  time (which is, of course, immediately when using a shared back-end or<br \/>\n  an auto-commit session).<\/p>\n<\/blockquote>\n<p>(from the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/franz.com\/agraph\/support\/documentation\/current\/http-protocol.html#put-index\">docs for <code>put index<\/code><\/a>)<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\"><\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved What is &#8211;with-indices in AllegroGraph <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Your triple store contains triples spo (subject, predicate, object). A query against a graph so stored may have to traverse a lot of the graph to find nodes that match your query. AllegroGraph can store indices that make that traversal faster: finding all predicates that match first, for example, and the subject and object &#8230; <a title=\"[Solved] What is &#8211;with-indices in AllegroGraph\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\" aria-label=\"More on [Solved] What is &#8211;with-indices in AllegroGraph\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[6020,4493,1566,1611],"class_list":["post-33840","post","type-post","status-publish","format-standard","hentry","category-solved","tag-allegrograph","tag-graph-databases","tag-import","tag-upload"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] What is -with-indices in AllegroGraph - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] What is -with-indices in AllegroGraph - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Your triple store contains triples spo (subject, predicate, object). A query against a graph so stored may have to traverse a lot of the graph to find nodes that match your query. AllegroGraph can store indices that make that traversal faster: finding all predicates that match first, for example, and the subject and object ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-14T09:07:53+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] What is &#8211;with-indices in AllegroGraph\",\"datePublished\":\"2023-02-14T09:07:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\"},\"wordCount\":291,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"allegrograph\",\"graph-databases\",\"import\",\"upload\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\",\"name\":\"[Solved] What is -with-indices in AllegroGraph - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2023-02-14T09:07:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] What is &#8211;with-indices in AllegroGraph\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] What is -with-indices in AllegroGraph - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] What is -with-indices in AllegroGraph - JassWeb","og_description":"[ad_1] Your triple store contains triples spo (subject, predicate, object). A query against a graph so stored may have to traverse a lot of the graph to find nodes that match your query. AllegroGraph can store indices that make that traversal faster: finding all predicates that match first, for example, and the subject and object ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/","og_site_name":"JassWeb","article_published_time":"2023-02-14T09:07:53+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] What is &#8211;with-indices in AllegroGraph","datePublished":"2023-02-14T09:07:53+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/"},"wordCount":291,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["allegrograph","graph-databases","import","upload"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/","url":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/","name":"[Solved] What is -with-indices in AllegroGraph - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2023-02-14T09:07:53+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-what-is-with-indices-in-allegrograph\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] What is &#8211;with-indices in AllegroGraph"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/33840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=33840"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/33840\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=33840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=33840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=33840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}