find
General Purpose
This service retrieves a set number and the number of records answering a search request inserted by the user.
Interface Type
X-Service
Product Version Compatibility
Version 18 and later
Input Parameters
1. BASE – X (20).
2. ADJACENT – X (1).
3. CODE – X (5).
4. REQUEST – X (500).
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 search string exactly. If Adjacent is set to N, then the search looks for each of the words in the string separately.
- Code: 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 is 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 is based on WRD.
Note: The request can contain up to 500 characters. You should take into consideration that the system inserts quotation marks before and after each element of the query, which increases the total amount of characters in the query.
For example:
isbn=0870931806+OR+isbn=0903686090
is converted to:
isbn=”0870931806″+OR+isbn=”0903686090″
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://ram19:8995/X?op=find&code=wrd&request=art&base=usm01
or
http://ram19:8995/X?op=find&request=wrd=art&base=usm01
If all goes well, the above example will generate XML output containing relevant find query information:
<?xml version = "1.0" encoding = "UTF-8"?> <find> <set_number>000001</set_number> <no_records>000000674</no_records> <no_entries>000000674</no_entries> <session-id>GPUNJL7TSELY4JV69LRNUCNLF1BGQVY77CSQBSY7BVSVE7BS4I</session-id> </find>
2. If you want to search for all documents which containing the phrase modern art in their title:
http://ram19:8995/X?op=find&code=wti&request=modern art&base=usm01&adjacent=Y
If all goes well, the above example generates XML output containing relevant find query information:
<?xml version = "1.0" encoding = "UTF-8"?> <find> <set_number>000002</set_number> <no_records>000000003</no_records> <no_entries>000000003</no_entries> <session-id>BYR3LRA1FHGT9H7N15Y6BXLU3GXG6QPIMDGABBC1HK1FNAE6AM</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://ram19:8995/X?op=find&request=modern art&base=usm01&adjacent=Y
If all goes well, the above example generates XML output containing relevant find query information:
<?xml version = "1.0" encoding = "UTF-8"?> <find> <set_number>000003</set_number> <no_records>000000006</no_records> <no_entries>000000006</no_entries> <session-id>VUT8HH58RUTNCR5ETISNHACGXSQQHJE2H18PN1XXHG2I9QMYVQ</session-id> </find>
Possible Error Codes
1. If you tried to activate the X-Service without giving Request as an input, the following error message appears in the XML output:
< error>Request must be filled</error>
2. If you provided the code .SYS. for search, and the Request is not for a numeric value, the following error message appears in the XML output:
< error>SYS must have a numeric value.</error>
3. If there is a problem in the search URL , the following error message appears in the XML output:
< error>expression normalization error</error>
4. If the number of documents in the set created based on the search criteria is 0, the following error message appears in the XML output:
< error>empty set</error>
5. If the search criteria retrieved too many documents, the following error message appears in the XML output:
< error>Too many hits. Refine your request [Aleph:internal error code 26]</error>
6. If the set created based on the criteria, is too long for a search with adjacency, the following error message appears in the XML output:
< error>Set is too large for adjacency check. Refine your request or skip adjacency check [Aleph:internal error code 47]</error>
7. If, for some reason, there was an error parsing the find request, the following error message appears in the XML output:
< error>Error parsing find request [Aleph:internal error code 31]</error>
8. If, for some reason, the search failed, the following error message appears in the XML output:
< error>search failed [Aleph:internal error code 33]</error>
9. If the set number retrieved after the search is zero, the following error message appears in the XML output:
< error>error generating set</error>