Top Method Summary
Options Name Purpose
AssertSuccess (IHttpRequest, IHttpResponse) Raises an HttpException when the search engine did not answer with a success status code
CHARACTER BucketKey (JsonObject) Returns the key of a bucket as a character
CHARACTER DescribeDocument (JsonArray) Returns the first document of the query result as text
CHARACTER DescribeEntity (IHttpResponse) Returns the body of the given response as text
Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (character, character, JsonObject, handle) Executes the given Query based on the Index Name, Query and Request Payload (JSON)
Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (SmartIndexQuery, handle) Executes the given Query based on the Index Name, Query and Request Payload (JSON)
Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (URI, character, character, JsonObject, handle) Executes the given Query based on the Index Name, Query and Request Payload (JSON)
Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (URI, character, character, JsonObject, integer, integer, handle) Executes the given Query, returning at most piSize documents
Consultingwerk.SmartIndex.SmartIndexQueryResult FetchNext (SmartIndexQuery, SmartIndexQueryResult, handle) Fetches the batch of documents following the given result
Consultingwerk.Framework.IConfigurationProvider GetConfigurationProvider () Returns the IConfigurationProvider with the application settings
OpenEdge.Net.HTTP.Credentials GetCredentials () Returns the credentials for the Elasticsearch cluster
OpenEdge.Net.URI GetEndpoint () Returns the Elasticsearch endpoint from the application settings
CHARACTER GetPassword () Returns the password for the Elasticsearch cluster from the application settings
CHARACTER GetSetting (character) Returns a setting from the application settings
INT64 GetTotal (JsonObject) Returns the total number of documents matching the query
Progress.Json.ObjectModel.JsonObject ProjectDocument (JsonObject, handle) Reduces an indexed document to the fields of the result temp-table
Consultingwerk.SmartIndex.SmartIndexAggregation ReadAggregation (JsonObject) Reads a single aggregation of a response
ReadAggregations (JsonObject, SmartIndexAggregationDictionary) Reads the aggregations of a response into the given dictionary
ReadResults (handle, JsonArray) Reads the documents of the query result into the temp-table
Progress.Json.ObjectModel.JsonArray ResponseToJsonArray (JsonObject, handle) Converts the hits -> _source to a JSON Array


Method Detail
Top

AssertSuccess (IHttpRequest, IHttpResponse)

Purpose: Raises an HttpException when the search engine did not answer
with a success status code
Notes: The response body carries the reason the search engine rejected
the request, so it is added as a second message - without it an
Elasticsearch error is reduced to a bare status code

Parameters:
poRequest OpenEdge.Net.HTTP.IHttpRequest
The HTTP request that was executed
poResponse OpenEdge.Net.HTTP.IHttpResponse
The HTTP response returned by the search engine
Top

CHARACTER BucketKey (JsonObject)

Purpose: Returns the key of a bucket as a character
Notes: A bucket key is a string, a number or a date depending on the
aggregated field. Where the search engine provides a formatted
key (key_as_string, e.g. for dates) that is preferred over the
raw value

Parameters:
poBucket Progress.Json.ObjectModel.JsonObject
The JSON object holding the bucket
Returns CHARACTER
The key of the bucket
Top

CHARACTER DescribeDocument (JsonArray)

Purpose: Returns the first document of the query result as text
Notes: For error reporting only

Parameters:
poDocuments Progress.Json.ObjectModel.JsonArray
The JSON array with the documents of the query result
Returns CHARACTER
The first document as text
Top

CHARACTER DescribeEntity (IHttpResponse)

Purpose: Returns the body of the given response as text
Notes: For error reporting only - the text is truncated so that a large
response cannot overflow the message

Parameters:
poResponse OpenEdge.Net.HTTP.IHttpResponse
The HTTP response to describe
Returns CHARACTER
The response body as text
Top

Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (character, character, JsonObject, handle)

Purpose: Executes the given Query based on the Index Name,
Query and Request Payload (JSON)
Notes: Uses the endpoint from the "elasticsearch.endpoint" setting
of the IConfigurationProvider

Parameters:
pcIndexName CHARACTER
The name of the Index to Query
pcQuery CHARACTER
The query argument
poPayload Progress.Json.ObjectModel.JsonObject
The JSON object with the request details
phResultBuffer HANDLE
The handle of the buffer to receive the resulting records
Returns Consultingwerk.SmartIndex.SmartIndexQueryResult
The query response
Top

Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (SmartIndexQuery, handle)

Purpose: Executes the given Query based on the Index Name,
Query and Request Payload (JSON)
Notes: Uses the endpoint from the "elasticsearch.endpoint" setting
of the IConfigurationProvider

Parameters:
poQuery Consultingwerk.SmartIndex.SmartIndexQuery
The SmartIndexQuery instance
phResultBuffer HANDLE
The handle of the buffer to receive the resulting records
Returns Consultingwerk.SmartIndex.SmartIndexQueryResult
The query response
Top

Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (URI, character, character, JsonObject, handle)

Purpose: Executes the given Query based on the Index Name,
Query and Request Payload (JSON)
Notes: The credentials from the application settings are applied to
the request, also when the endpoint is passed in explicitly

Parameters:
poUri OpenEdge.Net.URI
The URL of the ElasticSearch endpoint
pcIndexName CHARACTER
The name of the Index to Query
pcQuery CHARACTER
The query argument
poPayload Progress.Json.ObjectModel.JsonObject
The JSON object with the request details
phResultBuffer HANDLE
The handle of the buffer to receive the resulting records
Returns Consultingwerk.SmartIndex.SmartIndexQueryResult
The query response
Top

Consultingwerk.SmartIndex.SmartIndexQueryResult ExecuteQuery (URI, character, character, JsonObject, integer, integer, handle)

Purpose: Executes the given Query, returning at most piSize documents
Notes: The size is passed to Elasticsearch as a query parameter rather
than in the request body, so that it is visible in the request
URL. A size of 0 leaves it to Elasticsearch, which defaults to 10

Parameters:
poUri OpenEdge.Net.URI
The URL of the ElasticSearch endpoint
pcIndexName CHARACTER
The name of the Index to Query
pcQuery CHARACTER
The query argument
poPayload Progress.Json.ObjectModel.JsonObject
The JSON object with the request details
piSize INTEGER
The maximum number of documents to return
piFrom INTEGER
The offset of the first document to return
phResultBuffer HANDLE
The handle of the buffer to receive the resulting records
Returns Consultingwerk.SmartIndex.SmartIndexQueryResult
The query response
Top

Consultingwerk.SmartIndex.SmartIndexQueryResult FetchNext (SmartIndexQuery, SmartIndexQueryResult, handle)

Purpose: Fetches the batch of documents following the given result
Notes: Continues at From + Size of the previous result, so the caller
does not have to track the offset. The records are added to the
temp-table - emptying it between two batches is up to the
caller. When the previous result was already the last batch no
request is made at all.
Without a previous result this behaves exactly like
ExecuteQuery, so a paging loop can call FetchNext from the
start without a special case for the first batch

Parameters:
poQuery Consultingwerk.SmartIndex.SmartIndexQuery
The SmartIndexQuery instance that produced the previous result
poPreviousResult Consultingwerk.SmartIndex.SmartIndexQueryResult
The result of the preceding fetch, or the unknown value for the first batch
phResultBuffer HANDLE
The handle of the buffer to receive the resulting records
Returns Consultingwerk.SmartIndex.SmartIndexQueryResult
The result of the query
Top

Consultingwerk.Framework.IConfigurationProvider GetConfigurationProvider ()

Purpose: Returns the IConfigurationProvider with the application settings
Notes: The default implementation is supplied so that the engine can
also be used from a session where no framework startup routine
has registered a configuration provider, matching what the
ElasticSearchUploader does. The settings file is resolved
through the PROPATH rather than relative to the working
directory

Returns Consultingwerk.Framework.IConfigurationProvider
The IConfigurationProvider with the application settings
Top

OpenEdge.Net.HTTP.Credentials GetCredentials ()

Purpose: Returns the credentials for the Elasticsearch cluster
Notes: Returns an invalid object reference when no user is configured,
so that an unsecured cluster is queried without an
Authorization header

Returns OpenEdge.Net.HTTP.Credentials
The Credentials from the application settings
Top

OpenEdge.Net.URI GetEndpoint ()

Purpose: Returns the Elasticsearch endpoint from the application settings
Notes: The endpoint may be configured with or without a trailing
slash, so it is normalized the same way as in the
ElasticSearchUploader

Returns OpenEdge.Net.URI
The URI of the Elasticsearch endpoint
Top

CHARACTER GetPassword ()

Purpose: Returns the password for the Elasticsearch cluster from the
application settings
Notes: The password is stored in clear text unless the
"elasticsearch.passwordDecryptionProvider" setting names the
decryption provider it was encrypted with, see
Consultingwerk.Framework.DecryptionProviderHelper

Returns CHARACTER
The clear text password
Top

CHARACTER GetSetting (character)

Purpose: Returns a setting from the application settings
Notes:

Parameters:
pcName CHARACTER
The name of the setting
Returns CHARACTER
The value of the setting
Top

INT64 GetTotal (JsonObject)

Purpose: Returns the total number of documents matching the query
Notes: Elasticsearch reports hits -> total as an object carrying the
value and a relation ("eq" or "gte" - the latter when the count
was capped by track_total_hits). Releases before 7.0 reported it
as a plain number, which is still accepted here

Parameters:
poResponse Progress.Json.ObjectModel.JsonObject
The response JSON Object
Returns INT64
The total number of documents matching the query
Top

Progress.Json.ObjectModel.JsonObject ProjectDocument (JsonObject, handle)

Purpose: Reduces an indexed document to the fields of the result temp-table
Notes: A document carries whatever was uploaded into the index, which is
more than the caller asked for and not necessarily flat: a
ProDataset with child tables is serialized with the child records
nested inside the parent record, so the document of a Customer
index contains an "eSalesrep" array. READ-JSON cannot put that
into a flat temp-table and fails with "unexpected token: bracket".
Only the properties that match a field of the result temp-table
are copied, and only when they carry a scalar value - nested
arrays and objects are dropped

Parameters:
poSource Progress.Json.ObjectModel.JsonObject
The _source object of a single hit
phResultBuffer HANDLE
The handle of the buffer receiving the records
Returns Progress.Json.ObjectModel.JsonObject
The document reduced to the fields of the temp-table
Top

Consultingwerk.SmartIndex.SmartIndexAggregation ReadAggregation (JsonObject)

Purpose: Reads a single aggregation of a response
Notes:

Parameters:
poSource Progress.Json.ObjectModel.JsonObject
The JSON object holding the aggregation
Returns Consultingwerk.SmartIndex.SmartIndexAggregation
The aggregation
Top

ReadAggregations (JsonObject, SmartIndexAggregationDictionary)

Purpose: Reads the aggregations of a response into the given dictionary
Notes: The aggregations are a sibling of the hits in the response, and
every bucket may carry sub aggregations of its own - which is
why this walks the response recursively

Parameters:
poSource Progress.Json.ObjectModel.JsonObject
The JSON object holding the aggregations
poTarget Consultingwerk.SmartIndex.SmartIndexAggregationDictionary
The dictionary to add the aggregations to
Top

ReadResults (handle, JsonArray)

Purpose: Reads the documents of the query result into the temp-table
Notes: READ-JSON reports a structural mismatch between a document and
the temp-table with a bare parser error that names neither the
document nor the field, so the first document is added to the
error message

Parameters:
phTempTable HANDLE
The handle of the temp-table to read the documents into
poDocuments Progress.Json.ObjectModel.JsonArray
The JSON array with the documents of the query result
Top

Progress.Json.ObjectModel.JsonArray ResponseToJsonArray (JsonObject, handle)

Purpose: Converts the hits -> _source to a JSON Array
Notes: Preparation for loading it into a Temp-Table. Every document is
reduced to the fields of the result temp-table, see
ProjectDocument

Parameters:
poJsonObject Progress.Json.ObjectModel.JsonObject
The response JSON Object
phResultBuffer HANDLE
The handle of the buffer receiving the records
Returns Progress.Json.ObjectModel.JsonArray
The JSON Array with the hits -> _source


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:17:20