find

General Purpose

This service retrieves a set number and the number of records answering a search request inserted by the user.

Input Parameters

1. BASE – X (20).
2. ADJACENT – X (1).
3. CODE – X (5).
4. REQUEST – X (500).
5. DATE_FROM – 9(9).
6. DATE_TO – 9(9).
7. IGNORE_LIMITS – X (1).

NOTE:

This service supports searching by Common Command Language (CCL).

  1. The Adjacent field is not mandatory. The default, if not supplied, is N.
  2. The Code field is not mandatory, but if not supplied, then Request should contain the full search string (the code must be based on tab00).

If the Code field is empty, and the Request field does not include the code, then the default is search by WRD.

  • Base: The base where you want to search for documents.
  • Adjacent: If, for example, the search string combines more than one word, then if Adjacent=Y, the search looks for documents with this exact search string. If Adjacent is set to N, then the search looks for each of the words in the string separately.
  • Code8: The code of the given search string inserted by user. If the search string is, for example, WRD = (art), then Code is : WRD. The code is based on tab00.
  • Request: This is the requested search string. If, for example, the string is: WRD = (art), and Code has been provided, then Request will be: art. If Code has not been provided, then the request must be: wrd = (art). If Code is not provided and Request does not include code, then the default search will be based on WRD.
  • Date_from: This field is used to filter by date issued from date.
  • Date_to: This field is used to filter by date issued to date used only in case date from is full.
  • Ignore_limits: When this field is set to Y, the Find operation creates a result set with an unlimited number of entries. When this field is set to N (the default), the Find operation creates a result set with the number of entries limited by the set_result_set_limit setting in the www_server.conf file.

NOTE: Date_from and date_to are active in special configuration and are disregarded otherwise.

Output XML Format

The XML output includes the set number created for the given search criteria, the number of hits and the number of documents.

Example:

1. If you want to search for all documents containing the word art, enter the following URL:

http://ram7:8881/X?op=find&code=wrd&request=art&base=gen01

or

http://ram7:8881/X?op=find&request=wrd=art&base=gen01

or

http://ram7:8881/X?op=find&request=wrd=art&base=gen01&date_from=19000101&date_to=20080101

If successful, the above example generates XML output containing relevant find query information:

<find>
  <set_number>000937</set_number>
  <no_records>000000683</no_records>
  <no_entries>000000683</no_entries>
  <session-id>2SCMP5YJTGGXVLHGXLYSQXM1GI4ME7P3KTALVPGY7RXMI8PEKE</session-id>
</find>

2. If you want to search for all documents which contain the phrase modern art in their title:

http://ram7:8881/X?op=find&code=wti&request=modern art&base=gen01&adjacent=Y

If successful, the above example generates XML output containing relevant find query information:

<find>
  <set_number>000943</set_number>
  <no_records>000000003</no_records>
  <no_entries>000000003</no_entries>
  <session-id>9BDFRL7C9IJB4Y2D6HPH4JT1QEF866ELVSRG8P9IHYCHYPJVMJ</session-id>
</find>

If no Code is provided and the Request includes the Code, the result is different, since the default for searching is WRD:

http://ram7:8881/X?op=find&request=modern art&base=gen01&adjacent=Y

If successful, the above example generates XML output containing relevant find query information:

<find>
  <set_number>000944</set_number>
  <no_records>000000006</no_records>
  <no_entries>000000006</no_entries>
  <session-id>GCKCCLLT2J9QI7G4X8ID79BKINF7A5DKTQ1JYHMVU3KH3KNE3D</session-id>
</find>

4. If you want to search for all documents which contain the phrase art in their title and painting in their subject:

http://ram7:8881/X?op=find&base=gen01&request=(wti=art AND wsu=painting)

Notice in the above that no code is supplied. The multi-code search codes are supplied in the CCL request itself.

Possible Error Codes

1. If the fnd X-Service is activated without the request having been entered, the following message appears in the output XML:

<error>Request must be filled</error>

2. If you provided the code .SYS. for search, and the Request is not for a numeric value:

<error>SYS must have a numeric value.</error>

3. If there is a problem in the search URL:

<error>expression normalization error</error>

4. If the number of documents in the set created based on the search criteria is 0:

<error>empty set</error>

5. If the search criteria retrieved too many documents:

<error>Too many hits. Refine your request [DigiTool:internal error code 26]</error>

6. If the set created based on the criteria, is too long for a search with adjacency:

<error>Set is too large for adjacency check. Refine your request or skip adjacency check [DigiTool:internal error code 47]</error>

7. If, for some reason, there was an error parsing the find request:

<error>Error parsing find request [DigiTool:internal error code 31]</error>

8. If, for some reason, the search failed:

<error>search failed [DigiTool:internal error code 33]</error>

9. If the set number retrieved after the search is zero:

<error>error generating set</error>