User bio
404 bio not found
Member since Nov 9, 2015
Posts:
Replies:
Sounds fun! Feel free to take a look at this demo (and the other ones in the same folder).
That REST API is indeed for querying iFind indices (hence the direct reference to an index you can provide) and the somewhat confusingly named "query" argument is actually to pass in the iFind search string. The API will then build a full SQL query for you and run it right away.
Here's the OpenAPI spec for this endpoint (from self-documentation endpoint /api/iKnow/v1/USER/swagger):
/table/{table}/search:
post:
operationId: /table/{table}/search-POST
summary: |
Search the given iFind index in the given table
tags: ["iFind"]
parameters:
- $ref: '#/parameters/tableParam'
- name: RequestBody
description: JSON object with a list of query-specific arguments
in: body
schema:
type: object
properties:
query:
description: This is the only necessary parameter with no default value. The search terms to query against the iFind index.
type: string
index:
description: the iFind index would be searched against, if you don't specify it, the first found iFind index would be used .
type: string
option:
$ref: '#/definitions/OptionSpec'
distance:
description: only valid when option is fuzzy search (when option is 3)
type: string
example: "3"
language:
description: iKnow-supported language model to apply, for example "en"
type: string
includeText:
description: whether the returned columns should include the column beging indexed by 'index'
type: integer
default: 0
enum: [0, 1]
columns:
description: specify the columns which also needed to be returned. For example, ["column1","column2"]
type: array
example: []
items:
type: string
highlightSpec:
$ref: '#/definitions/HighlightSpec'
description: the parameters needed for Highlight
rankSpec:
$ref: '#/definitions/RankSpec'
description: the parameters needed for Rank
where:
description: the valid SQL logical condition statement. For example, "column1 = ? AND column2 = ?"
type: string
responses:
200:
description: Successful response
schema:
type: object
properties:
rows:
type: array
default: []
items:
type: object
Open Exchange applications:
Certifications & Credly badges:
Benjamin has no Certifications & Credly badges yet.
Global Masters badges:







Followers:
Following:
Benjamin has not followed anybody yet.
I agree it's become more of a style preference thing, so absolutely something to have strong opinions and religious debates about :-)
The only thing to avoid is using Dynamic SQL to conveniently build your query and then feed in query parameters through string concatenation rather than as true ?-style parameters. That's a security risk you wouldn't run with Embedded SQL. That's all. Back to the debate! :-)