Skip to content

Commit b3495d1

Browse files
committed
- Turing 0.3.10
1 parent a149627 commit b3495d1

38 files changed

+3813
-8
lines changed

doc.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,11 @@ asciidoctor-pdf --base-dir docs docs/turing/0.3.9/turing-installation-guide.adoc
3232
asciidoctor-pdf --base-dir docs docs/turing/0.3.9/turing-developer-guide.adoc -a imagesdir=/ -o turing/turing-developer-guide-0.3.9.pdf
3333
asciidoctor-pdf --base-dir docs docs/turing/0.3.9/turing-release-notes.adoc -a imagesdir=/ -o turing/turing-release-notes-0.3.9.pdf
3434

35+
asciidoctor-pdf --base-dir docs docs/turing/0.3.10/turing-administration-guide.adoc -a imagesdir=/ -o turing/turing-administration-guide-0.3.10.pdf
36+
asciidoctor-pdf --base-dir docs docs/turing/0.3.10/turing-connectors.adoc -a imagesdir=/ -o turing/turing-connectors-0.3.10.pdf
37+
asciidoctor-pdf --base-dir docs docs/turing/0.3.10/turing-installation-guide.adoc -a imagesdir=/ -o turing/turing-installation-guide-0.3.10.pdf
38+
asciidoctor-pdf --base-dir docs docs/turing/0.3.10/turing-developer-guide.adoc -a imagesdir=/ -o turing/turing-developer-guide-0.3.10.pdf
39+
asciidoctor-pdf --base-dir docs docs/turing/0.3.10/turing-release-notes.adoc -a imagesdir=/ -o turing/turing-release-notes-0.3.10.pdf
40+
3541
asciidoctor-pdf --base-dir docs docs/vecchio-developer-guide.adoc -a imagesdir=/ -o vecchio/vecchio-getting-started.pdf
3642
asciidoctor-pdf --base-dir docs docs/vecchio-getting-started.adoc -a imagesdir=/ -o vecchio/vecchio-getting-started.pdf
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
==== Auto Complete
2+
3+
Returns a term array that starts with the query value.
4+
5+
===== API Endpoint
6+
....
7+
GET http://localhost:2700/api/sn/{{siteName}}/ac
8+
....
9+
10+
===== Path Parameters
11+
[%header,cols=4*]
12+
|===
13+
| Attribute | Required / Optional | Description | Example
14+
| siteName | Required | Site Name | Sample
15+
|===
16+
17+
===== Query String
18+
[%header,cols=5*]
19+
|===
20+
| Attribute | Type | Required / Optional | Description | Example
21+
| q | String| Required | Search Query. | q=foo
22+
| rows | Integer | Optional | Number of rows that query will return. | rows=10
23+
| _setlocale | Boolean | Required | Locale of Semantic Navigation Site | _setlocale=en_US
24+
|===
25+
26+
===== Example - Request
27+
```bash
28+
curl -X 'GET' \
29+
'http://localhost:2700/api/sn/Sample/ac?q=dis&rows=10&_setlocale=en_US' \
30+
-H 'Content-Type: application/json'
31+
```
32+
33+
===== Example - Response
34+
```json
35+
[
36+
"disc",
37+
"discovery"
38+
"disco"
39+
"disney"
40+
]
41+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
==== Detect Language
2+
3+
Detect a language of text was sent.
4+
5+
===== API Endpoint
6+
....
7+
GET http://localhost:2700/api/cognitive/detect-language
8+
....
9+
10+
===== Headers
11+
12+
include::turing-api-headers.adoc[]
13+
14+
===== Query String
15+
[%header,cols=5*]
16+
|===
17+
| Attribute | Type | Required / Optional | Description | Example
18+
| text | String | Required | Text to validated | text=fuu ber
19+
|===
20+
21+
===== Example - Request
22+
```bash
23+
curl -X 'GET' \
24+
'http://localhost:2700/api/cognitive/detect-language?text="Hello World"' \
25+
-H 'Content-Type: application/json' \
26+
-H 'Key: {{Enter your API KEY}}' \
27+
28+
```
29+
30+
===== Example - Response
31+
```json
32+
"en_US"
33+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
==== Spell Check
2+
3+
Corrects text based on the given language.
4+
5+
===== API Endpoint
6+
....
7+
GET http://localhost:2700/api/cognitive/spell-checker/{{locale}}
8+
....
9+
10+
===== Headers
11+
12+
include::turing-api-headers.adoc[]
13+
14+
===== Path Parameters
15+
[%header,cols=5*]
16+
|===
17+
| Attribute | Type | Required / Optional | Description | Example
18+
| locale | String | Required | Locale of Semantic Navigation Site | en_US
19+
|===
20+
21+
===== Query String
22+
[%header,cols=5*]
23+
|===
24+
| Attribute | Type | Required / Optional | Description | Example
25+
| text | String | Required | Text to validated | text=fuu ber
26+
|===
27+
28+
===== Example - Request
29+
```bash
30+
curl -X GET \
31+
"http://localhost:2700/api/cognitive/spell-checker/en_US?text=urange" \
32+
-H "Accept: application/json" \
33+
-H "Key: {{Enter your API KEY}}"
34+
```
35+
36+
===== Example - Response
37+
```json
38+
[
39+
"range",
40+
"orange",
41+
"grange",
42+
"Grange",
43+
"Orange",
44+
"u range"
45+
]
46+
```
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
API headers include the mandatory information you send along with the request URL and body. This information helps provide insights into request context and authorization credentials that, in turn, allows access to protected resources.
2+
3+
[%header,cols=3*]
4+
|===
5+
| Key | Value | Description
6+
| Key | api-key | API key helps authenticate the application with the server. For generating API key, refer to link:/docs/turing/0.3.7/developer-guide/#_generate-an-api-key[Generate an API Key]
7+
| Content-Type | application/json | Content-Type is a representation header that determines the type of data (media/resource) present in the request body
8+
| Accept | application/json | Determines the acceptable response type from the server
9+
|===
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[%header,cols=4*]
2+
|===
3+
| Attribute | Required / Optional | Description | Example
4+
| siteName | Required | Site Name | Sample
5+
|===
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[%header,cols=4*]
2+
|===
3+
| Attribute | Required / Optional | Description | Example
4+
| q | Required | Search Query. | q=foo
5+
| p | Required | Page Number, first page is 1. *DEFAULT: 1* | p=1
6+
| sort | Required | Sort values: `relevance`, `newest` and `oldest`. Or *FIELD*: *SORT* *DEFAULT: relevance* | sort=relevance or sort=title:asc
7+
| fq[] | Optional | Query Field. Filter by field using default operator in configuration or using the `fqOperator`(request) or `fq.op` (query string), using the following pattern: *FIELD*: *VALUE*. | fq[]=title:bar
8+
| fq.and[] | Optional | Query Field. Filter `AND` by field, using the following pattern: *FIELD*: *VALUE*. | fq.and[]=title:bar
9+
| fq.or[] | Optional | Query Field. Filter `OR` by field, using the following pattern: *FIELD*: *VALUE*. | fq.or[]=title:bar
10+
| fq.op | Optional | Query Field Operator. Filter OR by field, Operator values: `AND` and `OR`. | fq.op=AND
11+
| rows | Optional | Number of rows that query will return. *DEFAULT: Behavior Configuration*| rows=10
12+
| _setlocale | Required | Locale of Semantic Navigation Site | _setlocale=en_US
13+
| nfpr | Optional | Disable Auto Correction *DEFAULT: 0* | nfpr=1
14+
| group | Optional | Group by attribute | group=type
15+
|===
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
IMPORTANT: These parameters have precedence over the query string.
3+
4+
[%header,cols=4*]
5+
|===
6+
| Attribute | Type | Required / Optional | Description
7+
| query | String | Required | Search Query.
8+
| page | Integer | Required | Page Number, first page is 1. *DEFAULT: 1*
9+
| sort | String | Required | Sort values: `relevance`, `newest` and `oldest`. Or *FIELD*: *SORT*. *DEFAULT: relevance*
10+
| fq | String | Optional | Query Field. Filter by field using default operator in configuration or using the `fqOperator`(request) or `fq.op` (query string), using the following pattern: *FIELD*: *VALUE*.
11+
| fqAnd | String | Optional | Query Field. Filter `AND` by field, using the following pattern: *FIELD*: *VALUE*.
12+
| fqOr | String | Optional | Query Field. Filter `OR` by field, using the following pattern: *FIELD*: *VALUE*.
13+
| fqOperator | String | Optional | Query Field Operator. Filter OR by field, Operator values: `AND` and `OR`.
14+
| rows | Integer| Optional | Number of rows that query will return. *DEFAULT: Behavior Configuration*
15+
| locale | String | Required | Locale of Semantic Navigation Site
16+
| group | String | Optional | Group by attribute
17+
| targetingRules | String[] | Optional | Targeting Rules. Restrict search based in: *FIELD*: *VALUE*.
18+
| targetingRulesWithCondition | Map<String, String[]> | Optional | Targueting Rules with Condition
19+
| targetingRulesWithConditionAND | Map<String, String[]> | Optional | Targueting Rules `AND` with Condition
20+
| targetingRulesWithConditionOR | Map<String, String[]> | Optional | Targueting Rules `OR` with Condition
21+
| populateMetrics | Boolean | Optional | If populate metrics
22+
| userId | String| Optional | User Id
23+
| disableAutoComplete | Boolean | Optional | Disable Auto Correction. *DEFAULT: false*
24+
|===
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
===== Dates
2+
3+
Search on the semantic navigation site between Dates
4+
5+
IMPORTANT: You will use `fq[]`, `fq.and[]` and `fq.or[]` (query string) or `fq`, `fqAnd`, `fqOr` (request body) to define the dates using the expression with the following date format: `yyyy-MM-dd'T'HH:mm:ss'Z`
6+
7+
===== Between Dates
8+
....
9+
fq[]=attribute:[InitialDate TO EndDate].
10+
....
11+
12+
====== Example - Request
13+
```bash
14+
curl -X 'GET' \
15+
'http://localhost:2700/api/sn/Sample/search?q=foobar&_setlocale=en_US&fq[]=modificationDate:[2023-07-23T00:00:00Z+TO+2023-11-30T00:00:00Z]' \
16+
-H 'Content-Type: application/json'
17+
```
18+
19+
===== From a date
20+
....
21+
fq[]=attribute:[InitialDate TO *].
22+
....
23+
24+
====== Example - Request
25+
```bash
26+
curl -X 'GET' \
27+
'http://localhost:2700/api/sn/Sample/search?q=foobar&_setlocale=en_US&fq[]=modificationDate:[2023-07-23T00:00:00Z+TO+*]' \
28+
-H 'Content-Type: application/json'
29+
```
30+
31+
===== Until a date
32+
....
33+
fq[]=attribute:[* TO EndDate].
34+
....
35+
36+
====== Example - Request
37+
```bash
38+
curl -X 'GET' \
39+
'http://localhost:2700/api/sn/Sample/search?q=foobar&_setlocale=en_US&fq[]=modificationDate:[*+TO+2023-11-30T00:00:00Z]' \
40+
-H 'Content-Type: application/json'
41+
```
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
==== Search Latest
2+
3+
Returns the last terms searched by the user in the search.
4+
5+
===== API Endpoint
6+
....
7+
POST http://localhost:2700/api/sn/{{siteName}}/search/latest
8+
....
9+
10+
===== Headers
11+
12+
include::turing-api-headers.adoc[]
13+
14+
===== Path Parameters
15+
16+
include::turing-api-path.adoc[]
17+
18+
===== Query String
19+
[%header,cols=6*]
20+
|===
21+
| Attribute | Type | Required / Optional | Description | Default | Example
22+
| q | String| Required | Search Query. | - | q=foo
23+
| rows | Integer | Optional | Number of rows that query will return. | 5 | rows=10
24+
| _setlocale | Boolean | Required | Locale of Semantic Navigation Site | - | _setlocale=en_US
25+
|===
26+
27+
===== Request Parameters
28+
[%header,cols=5*]
29+
|===
30+
| Attribute | Type | Required / Optional | Description | Example
31+
| userId | String | Required | User Id | userId=john
32+
|===
33+
34+
===== Example - Request
35+
```bash
36+
curl -X POST \
37+
'http://localhost:2700/api/sn/Sample/search/latest?rows=5&_setlocale=en_US' \
38+
-H 'Content-Type: application/json'
39+
-H 'Key: {{Enter your API KEY}}'
40+
-d '{
41+
"userId": "john"
42+
}'
43+
```
44+
45+
===== Example - Response
46+
```json
47+
[
48+
"foo",
49+
"bar"
50+
]
51+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
==== Search Locales
2+
3+
List all locales on the semantic navigation site.
4+
5+
===== API Endpoint
6+
....
7+
GET http://localhost:2700/api/sn/{{siteName}}/search/locales
8+
....
9+
10+
===== Path Parameters
11+
12+
include::turing-api-path.adoc[]
13+
14+
===== Example - Request
15+
```bash
16+
curl -X 'GET' \
17+
'http://localhost:2700/api/sn/Sample/search/locales' \
18+
-H 'Content-Type: application/json'
19+
```
20+
21+
===== Example - Response
22+
```json
23+
[
24+
{
25+
"locale": "en_US",
26+
"link": "/api/sn/Sample/search?_setlocale=en_US"
27+
},
28+
{
29+
"locale": "pt_BR",
30+
"link": "/api/sn/Sample/search?_setlocale=pt_BR"
31+
}
32+
]
33+
```

0 commit comments

Comments
 (0)