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 NameDescriptionData TypeComments
RNrepresentative/agenttext, arrayList of names with address information. Non-structured.
PCPublishing CountrykeywordThe country code of the publishing authority.
NPPriority NumberskeywordList of application numbers of priority publications
PDPriority DatedateList of priority dates
PAPatent Applicanttext, arrayList of names with address information. Non-structured.
NCNational ClassificationtextList of US national classes. US patents only.
KIkind code (publication)keywordThe document kind code, such as A1, B1, etc.
ICIPC Classificationkeyword, arrayThis field contains all classifications, auxiliary and main.
ICAIPC Auxiliary Classificationkeyword, arrayList of auxiliary classifications
MCipc (main class — first class)text, arrayList of inventor names with address information. Non-structured.
GTGerman Titletext
FTFrench Titletext
ETEnglish Titletext
DEDocument NumberkeywordNumber the document was published under
DSDesignated Stateskeyword, arrayList of 2 letter country codes
DPDate of PublicationdateDate document was published
KORcorrection infokeywordIn case of corrections a code indicating reason for correction. Is dependent on publishing country.
ANApplication NumbertextFormat depends on publishing country, but generally 2 letter country code plus number, e.g. DE102014017626
ADApplication DatedateDate of application
ABAbstracttextPatent 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 CodeReasonComments
500Internal Server ErrorThis error code indicates that something went wrong during the request. This can also mean the query string was malformed! Check the message text returned.
400Bad RequestSomething is wrong with the query string or other parts of the request.

Service Endpoints

ActionVerbPathBodyResponseComment
BASE urlhttps://api.depa.techBase URL for API endpoint
URI searchGET/es/deparom/_search?q=…200 OKQuery specified in URL. See URI Search, below.
Request Body SearchGET/es/deparom/_searchQuery in JSON format200 OKQuery 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

1?q=fieldname:value

Example:

query example

1https://api.depa.tech/es/deparom/_search?q=PC:DE

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

1{
2 took: 8,
3 timed_out: false,
4 _shards: {
5 total: 5,
6 successful: 5,
7 failed: 0
8 },
9 hits: {
10 total: 409257,
11 max_score: 1.7483456,
12 hits: [{
13 _index: "deparom",
14 _type: "DEP",
15 _id: "DE.000102013007672.A1",
16 _score: 1.7483456,
17 _source: {
18 GT: "Verfahren und Vorrichtung zur Waferherstellung mit vordefinierter Bruchauslösestelle",
19 AD: "20130503",
20 DE: "102013007672",
21 AN: "DE102013007672",
22 AB: "<p num="0000">Die vorliegende Erfindung bezieht sich auf ein Verfahren zur Herstellung von Festkörperschichten...",
23 IN: ["Lichtensteiger, Lukas, Zürich, CH",
24 "Drescher, Wolfram, 01109, Dresden, DE"],
25 IC: ["H01L",
26 "H01L0021",
27 "H01L0021304"],
28 DP: "20141106",
29 MC: ["H01L",
30 "H01L0021",
31 "H01L0021304"],
32 KI: "A1",
33 PC: "DE",
34 PA: "Siltectra GmbH, 01099, Dresden, DE",
35 RN: "Kehl, Ascherl, Liebhoff & Ettmayr Patentanwälte Partnerschaft, 80538, München, DE"
36 }
37 },
38 {
39 ...
40 }]
41 }
42}

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

1{
2 "query": {
3 "query_string": {
4 "fields": [
5 "PA"
6 ],
7 "query": "\"Robert Bosch\""
8 }
9 }
10 }

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

1{
2 "query_string": {
3 "fields": [
4 "PA"
5 ],
6 "query": "\"Robert Koch\""
7 }
8}

This is only a partial JSON query, before sending it to elasticsearch it must be wrapped with { "query: ... } for it to work:

wrapped query

1{
2 "query": {
3 "query_string": {
4 "fields": [
5 "PA"
6 ],
7 "query": "\"Robert Bosch\""
8 }
9 }
10 }

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

1{
2 "query": {
3 "query_string": {
4 "fields": [
5 "PA"
6 ],
7 "query": "\"Robert Bosch\""
8 }
9 },
10 "stored_fields":[]
11 }

The result:

RESPONSE WITH IDS ONLY

1{
2 "took": 4,
3 "timed_out": false,
4 "_shards": {
5 "total": 5,
6 "successful": 5,
7 "failed": 0
8 },
9 "hits": {
10 "total": 32318,
11 "max_score": 10.117258,
12 "hits": [
13 {
14 "_index": "deparom",
15 "_type": "DEP",
16 "_id": "JP.000002016079978.A",
17 "_score": 10.117258,
18 "_timestamp": 1476393965592
19 },
20 {
21 "_index": "deparom",
22 "_type": "DEP",
23 "_id": "JP.000002016081534.A",
24 "_score": 10.117258,
25 "_timestamp": 1476393968574
26 },
27 {
28 ...
29 }
30 ]
31 }
32}

Back to Manuals