Note that there are some explanatory texts on larger screens.

plurals
  1. POMarklogic 7: Semantic Search
    primarykey
    data
    text
    <p>I have been trying to explore <strong>RDF Triple Store</strong> feature and <strong>Semantic Search</strong> capabilities of <strong>Marklogic 7</strong> and then querying using <strong>SPARQL</strong>. I was able to perform some basics operations on such as:</p> <pre><code>xquery version "1.0-ml"; import module namespace sem = "http://marklogic.com/semantics"at"/MarkLogic/semantics.xqy"; sem:rdf-insert(sem:triple(sem:iri("http://example.org/ns/people#m"), sem:iri("http://example.com/ns/person#firstName"), "Sam"),(),(),"my collection") </code></pre> <p>which creates a triple, and then query it using the following SPARQL:</p> <pre><code>PREFIX ab: &lt;http://example.org/ns/people#&gt; PREFIX ac: &lt;http://example.com/ns/person#&gt; SELECT ?Name WHERE { ab:m ac:firstName ?Name . } </code></pre> <p>which retrieves <em>Sam</em> as result. <strong><em>Edited</em></strong>: In my use case, I have a <strong>delimited file (Structured data)</strong> having 1 Billion records that I ingested into ML using MLCP which is stored in ML for instance as:</p> <pre class="lang-xml prettyprint-override"><code>&lt;root&gt; &lt;ID&gt;1000-000-000--000&lt;/ID&gt; &lt;ACCOUNT_NUM&gt;9999&lt;/ACCOUNT_NUM&gt; &lt;NAME&gt;Vronik&lt;/NAME&gt; &lt;ADD1&gt;D7-701&lt;/ADD1&gt; &lt;ADD2&gt;B-Valentine&lt;/ADD2&gt; &lt;ADD3&gt;Street 4&lt;/ADD3&gt; &lt;ADD4&gt;Fifth Avenue&lt;/ADD4&gt; &lt;CITY&gt;New York&lt;/CITY&gt; &lt;STATE&gt;NY&lt;/STATE&gt; &lt;HOMPHONE&gt;0002600000&lt;/HOMPHONE&gt; &lt;BASEPHONE&gt;12345&lt;/BASEPHONE&gt; &lt;CELLPHONE&gt;54321&lt;/CELLPHONE&gt; &lt;EMAIL_ADDR&gt;abc@gmail.com&lt;/EMAIL_ADDR&gt; &lt;CURRENT_BALANCE&gt;10000&lt;/CURRENT_BALANCE&gt; &lt;OWNERSHIP&gt;JOINT&lt;/OWNERSHIP&gt; &lt;/root&gt; </code></pre> <p>Now, I want to use RDF/Semantic feature for my dataset above. However, I am not able to understand whether I need to convert the above doc to RDF as shown below (shown for <code>&lt;NAME&gt;</code>) <em>assuming this to be a right way</em>:</p> <pre><code> &lt;sem:triple&gt; &lt;sem:subject&gt;unique/uri/Person &lt;/sem:subject&gt; &lt;sem:predicate&gt;unique/uri/Name &lt;/sem:predicate&gt; &lt;sem:object datatype="http://www.w3.org/2001/XMLSchema#string" xml:lang="en"&gt;Vronik &lt;/sem:object&gt; &lt;/sem:triple&gt; </code></pre> <p>and then ingest these docs in ML and search using SPARQL, or do I need to just ingest my documents and then <em>separately</em> ingest triples obtained from <em>external sources</em> and somehow (how..??) link them to my documents and then query using SPARQL? Or is there some other way that I ought to do this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload