= Search API = DOMS Search uses simple search methods of the Summa Search interface. WSDL: [[attachment:DomsGUISearch.xml]] Content of this page: * [[#operations|Operations]] * [[#resultXML|Result XML Description]] * [[#example|Result XML Example]] <> == Operations == === simpleSearch === This method executes the given query and returns a search result ranked by relevance. Input parameters: * {{{String query}}} The query string. * {{{int numberOfRecords}}} The maximum number of records returned in search result. * {{{int startIndex}}} The number of the first record to return. Returns: * {{{String simpleSearchReturn}}} The search result sorted by relevance as structured XML document. See [[#resultXML|description]] below. Throws: * {{{java.rmi.RemoteException}}} === simpleSearchSorted === This method executes the given query and returns a search result ranked by the given sort key. Input parameters: * {{{String query}}} The query string. * {{{int numberOfRecords}}} The maximum number of records returned in search result. * {{{int startIndex}}} The number of the first record to return. * {{{String sortKey}}} The key to sort by. * {{{boolean reverse}}} A boolean indication whether or not to sort in reverse. Returns: * {{{String simpleSearchReturn}}} The search result sorted by the given key, reversed if so indicated, as structured XML document. See [[#resultXML|description]] below. Throws: * {{{java.rmi.RemoteException}}} <> == Result XML Description == The result string defined by Summa is XML, in the following form: {{{ response-xml-1 response-xml-2 ... }}} Possible responses (in place of {{{response-xml-1}}}, {{{response-xml-2}}}, ... above) are document response, facet result and others. In DOMS we only use document response, which looks like this: {{{ ... ... ... }}} Currently, we do not have a schema for the result. The result can be read as follows: documentresult element * Attribute {{{filter}}} is not used in simple search results. * Attributes {{{query}}}, {{{startIndex}}}, {{{maxRecords}}}, {{{sortKey}}}, {{{reverseSort}}}: Same as input to method. * Attribute {{{fields}}}: Always "recordID, shortformat" in DOMS. * Attribute {{{searchTime}}}: Time it took to search. * Attribute {{{hitCount}}}: Number of results. record element * Attribute {{{score}}}: relevancy ranking, value from 0 to 1. * Attribute {{{sortValue}}} is the value that the sort was performed on. field element * Attribute {{{name}}}: In DOMS always either recordID or shortformat. * Contents are the PID for recordID, or XML for shortformat. The XML for shortformat is of the following form: {{{ ... ... ... netdokument net document ... ... }}} The important elements are the "dc" fields. They will contain the actual results. <> == Result XML Example == This example is the same as the one given by the [[http://wiki.statsbiblioteket.dk/summa/Community/Tutorials/MinimalDeployment|Summa Minimal Deployment Tutorial]], except without the facet result response. ##New Example: {{{ Pensare per immagini: una strada per la coscienza NoSubject NoOAI Ferdinando Testa oai:oai:doaj-articles:badd9ac32fc2e096cf76fec4f0d19250 Pensare per immagini: una strada per la coscienza Ferdinando Testa 2005 netdokument net document http://www.analisiqualitativa.com/magma/0304/articolo_01.htm http://www.doaj.org/doaj?func=openurl&genre=article&issn=17219809&date=2005&volume=03&issue=04&spage= todo La narrazione: dimensione ontologica della formazione NoSubject NoOAI Francesca Pulvirenti oai:oai:doaj-articles:dd2dffe34df1293e045aee58f06a5c3f La narrazione: dimensione ontologica della formazione Francesca Pulvirenti 2005 netdokument net document http://www.analisiqualitativa.com/magma/0303/editoriale.htm http://www.doaj.org/doaj?func=openurl&genre=article&issn=17219809&date=2005&volume=03&issue=03&spage= todo }}} ##Old Example: ##{{{ ## ## ## ## ## fagref:hj@example.com ## &lt;shortrecord&gt; ##&lt;rdf:RDF ##xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#"> ##&lt;rdf:Description&gt; ##&lt;dc:title&gt;Fagekspert i Datalogi&lt;/dc:title&gt; ##&lt;dc:creator&gt;Hans Jensen&lt;/dc:creator&gt; ##&lt;dc:type ##xml:lang=&quot;da&quot;&gt;person&lt;/dc:type&gt; ##&lt;dc:type ##xml:lang=&quot;en&quot;&gt;person&lt;/dc:type&gt; ##&lt;dc:identifier&gt;hj@example.com&lt;/dc:identifier&gt; ##&lt;/rdf:Description&gt; ##&lt;/rdf:RDF&gt; ##&lt;/shortrecord&gt; ## ## ## ## ##}}} ## ##The format of the "shortformat" field is (decoded version of contents above): ## ##{{{ ## ## ## ##Fagekspert i Datalogi ##Hans Jensen ##person ##person ##hj@example.com ## ## ## ##}}}