Skip to main content

Web Service Method: Retrieve Similar Documents

Abstract

Web Service Method: Retrieve Similar Documents

Description

Retrieve documents that are similar to document specified in request.

URL: /GraphSearch/api/similar

Request

Supported Methods

GET

Content-Type

application/x-www-form-urlencoded

HTTP Parameters

Parameter

Type

Required

Description

count

int

false

Number of results

documentFacets

Array of String

false

Fetch facets of a document. Set to all to fetch all facets.

encoding

String

false

Request encoding

fields

Array of String

false

Similarity fields

id

String

false

Identifier

locale

String

false

Search locale

searchSpaceId

String

false

SearchSpace Identifier

start

int

false

Start of result (pagination)

pluginName

String

false

Plugin Name

Response

Content Type

application/json

SimilarityResponse Object

Attribute

Type

Required

Comment

MIMETYPE_PRODUCT_NAME

String

false

message

String

false

short descriptive message of the operation result, or an error description

request

Object

false

Search request

result

Object

false

the actual response content body, defined by the resultType.

resultType

String

false

MIME type of the result if successful, or Exception type if an error occurred

status

int

true

indicates the success or error of the HTTP request, on the protocol layer

success

boolean

false

true if the operation was successful, on the application layer

total

long

false

Result size

Example Similarity Response
{
  "MIMETYPE_PRODUCT_NAME" : "some MIMETYPE_PRODUCT_NAME",
  "result" : { },
  "request" : { },
  "total" : 19726,
  "success" : true,
  "message" : "some message",
  "resultType" : "some resultType",
  "status" : 6613
}

Note

The return to this request will display these errors in the following specific cases:

  • If the Search Space ID is wrong, you will receive a 404 'Bad Request' message, with specific information in a JSON message as to the value that was not found.

  • If the credentials were mistyped or wrong: a 403 Forbidden, and a JSON message 'Access denied' will be returned.

  • If you didn't specify a Search Space ID: the return will be made for the default Search Space.

    • If the default Search Space is private and you are not authenticated, you will also receive a 403 Forbidden in a JSON message.