depa.index
This REST service allows users to search for patent documents in Patent Store. The service is based on Elasticsearch.
General
To search in the bibliographic data of documents in the Patent Store, we have provided an elasticsearch index called deparom. This index has been designed to behave in much the same way as the indices used by the DEPAROM client.
The REST interface provides direct access to the functionality of elasticsearch. This means that queries must be executed using the query form and syntax that elastic search supports. To convert queries from the legacy DEPAROM syntax to elastic search, use the DEPAROM Query Translator Service (DQT).
Information Required
To use this service no further information is required, just the query you intend to execute.
Using Queries
Elasticsearch search-api supports URI search as well as request body search, which one you use depends on your needs.
Field Mapping
These fields can be used in queries and returned in results. Generally speaking, the fields in the elasticsearch deparom index are named after the corresponding fields in DEPAROM. See the DEPAROM documentation for more details.
Field Name | Description | Data Type | Comments |
---|---|---|---|
RN | representative/agent | text, array | List of names with address information. Non-structured. |
PC | Publishing Country | keyword | The country code of the publishing authority. |
NP | Priority Numbers | keyword | List of application numbers of priority publications |
PD | Priority Date | date | List of priority dates |
PA | Patent Applicant | text, array | List of names with address information. Non-structured. |
NC | National Classification | text | List of US national classes. US patents only. |
KI | kind code (publication) | keyword | The document kind code, such as A1, B1, etc. |
IC | IPC Classification | keyword, array | This field contains all classifications, auxiliary and main. |
ICA | IPC Auxiliary Classification | keyword, array | List of auxiliary classifications |
MC | ipc (main class — first class) | text, array | List of inventor names with address information. Non-structured. |
GT | German Title | text | |
FT | French Title | text | |
ET | English Title | text | |
DE | Document Number | keyword | Number the document was published under |
DS | Designated States | keyword, array | List of 2 letter country codes |
DP | Date of Publication | date | Date document was published |
KOR | correction info | keyword | In case of corrections a code indicating reason for correction. Is dependent on publishing country. |
AN | Application Number | text | Format depends on publishing country, but generally 2 letter country code plus number, e.g. DE102014017626 |
AD | Application Date | date | Date of application |
AB | Abstract | text | Patent abstract from title page |
REST API
The api exposed connects directly to elasticsearch. The api is described in their documentation. Here just a few notes.
General Error Responses
The most important error codes are listed here. See the elasticsearch webpage for more details. Other responses are listed in the table below.
Elasticsearch returns a detailed error message in the response body in JSON format.
HTTP Code | Reason | Comments |
---|---|---|
500 | Internal Server Error | This error code indicates that something went wrong during the request. This can also mean the query string was malformed! Check the message text returned. |
400 | Bad Request | Something is wrong with the query string or other parts of the request. |
Service Endpoints
Action | Verb | Path | Body | Response | Comment |
---|---|---|---|---|---|
BASE url | https://api.depa.tech | Base URL for API endpoint | |||
URI search | GET | /es/deparom/_search?q=… | 200 OK | Query specified in URL. See URI Search, below. | |
Request Body Search | GET | /es/deparom/_search | Query in JSON format | 200 OK | Query specified in POST body. See Request Body Search, below. |
Search & Queries
URI Search
In this form of search, the query is appended to the URL as a query string. This is the most simple form of searching but also the most limited.
Query
The query is defined as follows:
query definition
Example:
query example
See the elasticsearch documentation for information on using more advanced options such as AND / OR operations.
Result
Below is an example response when searching the elastic search index. The important parts are found under hits.
The field total tells us the total number of documents found. The field max_score gives an indication of how relevant the results are.
The second hits field lists each document found. Each result contains a field called source containing the data fields of each document found. The field id can be used to retrieve further document artifacts (such as the PDF) from the Content Delivery Service (CDS).
Elastic Search Results
Request Body Search
When searching using this method, many more options are available.
The query is a complex JSON object, below is a simple example: a search for the applicant 'Robert Bosch'.
The outer field query defines where the actual query goes. In this case the search is on the field PA, the query is “Robert Bosch”. Note the use of quotes, which must be escaped using '\' in JSON. More search examples can be found on the elasticsearch website.
query example
Combining Search with Other Services
As stated above, it's possible to combine the search service with other Depa.Tech services, such as DQT and CDS.
Using Queries from DQT
The DEPAROM Query Translator (DQT) can used to generate elasticssearch queries from DEPAROM queries.
The query that is returned from DQT must be wrapped so that it can be used with elastic search.
Our example query in DEPAROM syntax would be: PA=“Robert Koch”. Sending this to DQT creates the following JSON snippet:
dqt example
This is only a partial JSON query, before sending it to elasticsearch it must be wrapped with { "query: ... }
for it to work:
wrapped query
Retrieving Artifacts from CDs
The Content Delivery Service (CDS) provides access to document artifacts, such as the PDF file or XML data. To access CDS, a document ID is needed. This ID is returned from elasticsearch. If all that is required is the PDF, for example, the query can be set to actually return just the ID. This speeds queries up, especially if large result sets are expected. To do this, set stored_fields to [], which means return no fields:
QUERY TO RETURN IDS ONLY
The result:
RESPONSE WITH IDS ONLY
Back to Manuals