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 works only 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

title

String

true

Content title

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 Chuck Norris",
  "facets" : { },
  "synchronize" : true
}

Response

Content Type

text/plain

More examples find here: Index and Annotate Document - Examples