geo-data / medin-portal

Implementation of the MEDIN portal
http://portal.oceannet.org
3 stars 1 forks source link

Change search title to 'Data Holder' #4

Closed homme closed 10 years ago

homme commented 12 years ago

Search title to be changed to 'Data Holder' with the target of the search being both 'Custodian' and 'Distributor'. It will be a drop-down list from EDMO, with only those organisations that exist in the target fields being shown. For EDMO visit http://seadatanet.maris2.nl/edmo/ but for the actual webservice documentation go to: http://seadatanet.maris2.nl/ws/ws_edmo.asmx

WSDL available at http://seadatanet.maris2.nl/ws/ws_edmo.asmx?wsdl.

Helen to ask STFC to make a filter on data in the Custodian and Distributor fields possible. If this can't be done, then it will have to be a free text search.

gaev commented 11 years ago

STFC have enabled target searching on Custodian and Distributor fields

homme commented 11 years ago

Gaynor sent the contents for the dropdown list via email on Thu, 17 Jan 2013 15:51:51

homme commented 10 years ago

@SteveDonegan Hi Steve, I've tried to use the DataCustodian and DataDistributor targets but am hitting an error with the DWS. My SOAP request looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://discovery.ejb.revitalization.services.ndg/" xmlns:ns2="http://schemas.services.ndg/discovery" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <ns0:Body>
    <ns1:DoSearch>
      <request>
        <ns2:SearchCriteria>
          <ns2:TermSearch id="1">
            <ns2:Term>'''Plymouth Marine Laboratory (PML)'''</ns2:Term>
            <ns2:TermTarget>DataCustodian</ns2:TermTarget>
          </ns2:TermSearch>
          <ns2:TermSearch id="2" operator="OR">
            <ns2:Term>'''Plymouth Marine Laboratory (PML)'''</ns2:Term>
            <ns2:TermTarget>DataDistributor</ns2:TermTarget>
          </ns2:TermSearch>
          <ns2:ResourceLocator/>
        </ns2:SearchCriteria>
        <ns2:RetrieveCriteria>
          <ns2:OrderBy>
            <ns2:OrderByField>ResourceLocator</ns2:OrderByField>
            <ns2:OrderByDirection>descending</ns2:OrderByDirection>
          </ns2:OrderBy>
          <ns2:RecordDetail>DocumentSimple</ns2:RecordDetail>
        </ns2:RetrieveCriteria>
        <ns2:Start>1</ns2:Start>
        <ns2:HowMany>1</ns2:HowMany>
      </request>
    </ns1:DoSearch>
  </ns0:Body>
</SOAP-ENV:Envelope>

which is generating the following error response:

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header/>
  <env:Body>
    <ns3:DoSearchResponse xmlns:ns2="http://schemas.services.ndg/discovery" xmlns:ns3="http://discovery.ejb.revitalization.services.ndg/">
      <return>
        <ns2:Status>false</ns2:Status>
        <ns2:StatusMessage>ndg.common.exception.NdgSQLException: Error occurred during the execution of the following SQL: 
 SELECT distinct original_document_filename, original_document.original_document_id  FROM original_document, transformed_document,  to_tsquery('\'\'\'Plymouth |Marine |Laboratory |(PML)\'\'\'') AS query0,  to_tsquery('\'\'\'Plymouth |Marine |Laboratory |(PML)\'\'\'') AS query1 WHERE transformed_document.original_document_id = original_document.original_document_id AND  query0 @@ (data_custodian_ts_vector) OR  query1 @@ (data_distributor_ts_vector)</ns2:StatusMessage>
        <ns2:TicketId>0</ns2:TicketId>
        <ns2:Hits>-1</ns2:Hits>
      </return>
    </ns3:DoSearchResponse>
  </env:Body>
</env:Envelope>

It may well be my query construction but if not could you please have a dig into this at your end? Cheers.

homme commented 10 years ago

7f3f475 closes this. There is a related DWS issue (#41) that still needs investigation.