- PoolParty Semantic Suite Documentation
- PoolParty GraphSearch Overview
- GraphSearch API
- Content Management Services
- Web Service Method: Content Create
Web Service Method: Content Create
17/07/2025
Description |
---|
create a new document with a unique identifier |
Note
If you try to “create” a document with an identifier that already exists, this will not happen as GraphSearch ignores or rejects the create request. "Update" however either creates a new document or updates (i.e. overwrites) the existing document entry with the matching identifier.
Request URL:/GraphSearch/9.4/api/content/create
Request Methods: POST
Content-Type: application/x-www-form-urlencoded
ContentUpdateRequest
A request for creating and updating content.
Attribute | Type | Required | Comment |
---|---|---|---|
| string | true | author |
| string | false | context |
| date | false | creation date |
| facets | false | manually created facets; can be concept annotations or custom relations |
| URL | true | content URL/ID |
| URL | false | source URL of the representative image; only supported in Elasticsearch |
| string | false | text language |
| string | true | search space identifier |
| boolean | false | automatically synchronize; set to false for bulk content push; manually refresh the search space |
| string | false | text content |
| string | true | title |
| boolean | false | use extraction for tagging |
| URL | false | content from an external URL (web crawling) |
{ "date" : "2017-01-27", "identifier" : "https://semantic-web.com/", "image" : "https://semantic-web.com/", "website" : "https://semantic-web.com/", "author" : "some author", "useExtraction" : false, "language" : "de", "title" : "All about Chuck Norris", "facets" : { "conceptAnnotations" : [ "https://semantic-web.com/api/conceptAnnotations#23080", "https://semantic-web.com/api/conceptAnnotations#2515" ] }, "searchSpaceId" : "some searchSpaceId", "context" : "some context", "text" : "some text", "synchronize" : false }
A container for concept annotations and all other custom facets for a document. In addition to the known and reserved fields (such as conceptAnnotations) other fields can be added containing a predicate URI as a field name and a list of values mapped to it. The expected type of values depends on the predicate used.
Attribute | Type | Required | Comment |
---|---|---|---|
| array of string | false | a list of concept URIs which will be added to the document |
{ "conceptAnnotations" : [ "https://semantic-web.com/api/conceptAnnotations#3687" ] }
Content-Type: text/plain
Status: 200 - OK
The pattern [text](identifier)
is commonly used for links in markdown documents, but because it is reserved in Elasticsearch, you cannot use this syntax in content that will be indexed by Elasticsearch. Incompatible use of this syntax within documents, such as the text
and title
fields in the request body, can result in errors during indexing. For example, if you use the Content Create method, GraphSearch will return an internal server error because Elasticsearch rejects the index request for that text.
There are two cases in which this error occurs which can be detected by searching for their respective regex patterns and adjusting them before submitting them for indexing:
[<text>](<key>=<value>)
Behavior: This pattern will be misinterpreted by the annotated text mapper plugin.
Example Request:
{ "searchSpaceId": "12345-abc", "identifier": "https://example-url.com/123", "title": "Example", "synchronize": false, "useExtraction": false, "author": "", "text": "Forbidden pattern: [Text](lhs=rhs)" }
Solution: It can be found via the regex
\[([^]\[]*)]\(([^)(]*=[^)(]*)\)
and the affected field or fields can be modified to adjust the clashing syntax.
[<text>](<*>%<*>)
Behavior: If this pattern forms an invalid URL encoding it will be rejected. A valid URL encoding consists of a
%
sign followed by 2 or more characters.Example Request:
{ "searchSpaceId": "12345-abc", "identifier": "https://example-url.com/123", "title": "Example", "synchronize": false, "useExtraction": false, "author": "", "text": "Forbidden pattern: [Text](%A)" }
Solution: It can be found via the regex
\[([^]\[]*)]\(([^)(]*%[^)(]*)\)
and the affected field or fields can be modified to adjust the clashing syntax.