Skip to main content

Web Service Method: Create Indexed Document

Abstract

Web Service Method: Create Indexed Document

Description

This method creates a new entry in the search index for the given document.

Note

This methods only works in search taxonomy-based search configurations (Solr, Elasticsearch).

Note

In order to find appropriate content with search services, you should extract and annotate uploaded content with concepts from the thesaurus in advance during content creation and update with /api/content/create and /api/content/update APIs.

URL: /GraphSearch/api/content/create

Request

Supported Method

POST

Content-Type

application/json

JSON Object for a Request

Attribute

Type

Required

Comment

author

String

true

Content author

context

String

false

Content context

date

Date

false

Content creation

facets

Map of String

false

Content map of manually created facets (SearchField, facets)

identifier

URL

true

Content URL/ID

language

String

false

Content language

searchSpaceId

String

true

Search Space identifier

synchronize

boolean

false

Synchronize automatically. Set to false for bulk content push. Refresh manually.

text

String

false

Content text

By default, the maximum number of characters is 12048. This value can be changed in The poolparty.properties File.The poolparty.properties File

title

String

true

Content title

By default, the maximum number of characters is 1250. This can be changed in The poolparty.properties File.The poolparty.properties File

useExtraction

boolean

false

Use extraction for tagging

website

URL

false

Content from external URL (web crawling)

Example Request
{
  "date" : "2017-01-27",
  "identifier" : "https://semantic-web.com/",
  "searchSpaceId" : "some searchSpaceId",
  "website" : "https://semantic-web.com/",
  "author" : "some author",
  "context" : "some context",
  "useExtraction" : false,
  "language" : "en",
  "text" : "some text",
  "title" : "All about Cocktails",
  "facets" : { },
  "synchronize" : true
}

Response

Content Type

text/plain

For more examples, refer to Index and Annotate Document - Examples.