saveTextSearchSettings
put
/ccadmin/v1/merchant/textSearch
Saves the Text Search Settings.Enables or Disables text search based on input request. When a schedule is not provided in the payload for IncrementalIndexingSchedule and if there is no existing schedule already, then a default periodic schedule of 20 seconds is set.
Request
Supported Media Types
- application/json
Root Schema : saveTextSearchSettings_request
Type:
Show Source
object
-
enable:
boolean
Indicates whether text search need to be enabled or disabled.
-
scheduledJobs(optional):
array scheduledJobs
List of scheduled Jobs Data.
Example:
{
"enable":true,
"scheduledJobs":[
{
"schedule":{
"period":1000000
},
"scheduledJobName":"orderIncrementalIndexingSchedule",
"scheduleType":"periodic"
},
{
"schedule":{
"period":1000000
},
"scheduledJobName":"profileIncrementalIndexingSchedule",
"scheduleType":"periodic"
},
{
"schedule":{
"occurrenceInDay":2
},
"scheduledJobName":"orderOptimizationSchedule",
"scheduleType":"calendar"
},
{
"schedule":{
"weeksInMonth":[
1,
2,
3
],
"monthsInYear":[
1,
3
],
"daysOfWeek":[
1,
2,
3
],
"occurrenceInDay":2
},
"scheduledJobName":"profileOptimizationSchedule",
"scheduleType":"calendar"
}
]
}
Nested Schema : items
Type:
Show Source
object
-
schedule:
object schedule
-
scheduledJobName:
string
Name of the scheduled Job. Valid scheduled Jobs are: 'orderIncrementalIndexingSchedule', 'profileIncrementalIndexingSchedule','orderOptimizationSchedule','profileOptimizationSchedule'
-
scheduleType:
string
Schedule type could be periodic or calendar.If type is periodic then schedule must have property: period. If type is calendar then combinations of these properties are allowed: 1.occurenceInDay, daysOfWeek, weeksInMonth, monthsInYear. 2.monthsInYear, daysInMonth, occurenceInDay
Nested Schema : schedule
Type:
Show Source
object
-
daysInMonth:(optional):
integer
This field corresponds to the day of the month and it can be set to a number between 1 and 31 (depending on the number of days in the month).
-
daysOfWeek(optional):
integer
This field can be set to 1, 2, 3, 4, 5, 6, or 7, which correspond to Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.Example: [1,2,3] - This schedule runs once every Sunday, Monday and Tuesday
-
monthsInYear::(optional):
integer
This field can be set to 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, which correspond to January, February, March, April, May, June, July, August, September, October, November and December
-
occurrenceInDay(optional):
integer
This field can be set to 1 or 2, representing once a day or twice a day, respectively. The default is 1, in other words, if occurenceInDay is not specified, the order will be run once on the specified days.
-
period(optional):
integer
It contains value in milliseconds.Mandatory when scheduleType is periodic
-
weeksInMonth:(optional):
integer
This field can be set to 1, 2, 3, 4, or 5, which correspond to the first, second, third, fourth or last week of the month.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : saveTextSearchSettings_response
Type:
Show Source
object
-
enabled(optional):
boolean
Flag indicates whether text search is enabled or not.
-
errorMessage(optional):
string
Error message if there is any error while performing text search setup.
-
scheduledJobs(optional):
array scheduledJobs
List of scheduled Jobs created. This field is returned once setup is done and scheduled jobs are created
-
scheduledJobsInputData(optional):
array scheduledJobsInputData
List of scheduled Jobs Data given in the input. This feild is returned only when setup is 'inProgress'
-
setupRunning(optional):
boolean
Flag indicates whether text search setup is running or not.
-
statusMessage(optional):
string
Status message of the current request.Possible messages:Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true., Scheduled Jobs has been successfully created or updated.
Nested Schema : scheduledJobs
Type:
array
List of scheduled Jobs created. This field is returned once setup is done and scheduled jobs are created
Show Source
Nested Schema : scheduledJobsInputData
Type:
array
List of scheduled Jobs Data given in the input. This feild is returned only when setup is 'inProgress'
Show Source
Nested Schema : items
Type:
Show Source
object
-
componentPath(optional):
string
Supported scheduled job path
-
schedule(optional):
object schedule
-
scheduleDescription(optional):
string
Descriptive schedule information
-
scheduledJobName(optional):
string
Name of the scheduled Job. Valid scheduled Jobs are: 'orderIncrementalIndexingSchedule', 'profileIncrementalIndexingSchedule','orderOptimizationSchedule','profileOptimizationSchedule'
-
scheduleType(optional):
string
Schedule type could be periodic or calendar
Nested Schema : schedule
Type:
Show Source
object
-
period(optional):
integer
It contains value in milliseconds.
Nested Schema : items
Type:
Show Source
object
-
schedule(optional):
object schedule
-
scheduleDescription(optional):
string
Descriptive schedule information
-
scheduledJobName(optional):
string
Name of the scheduled Job. Valid scheduled Jobs are: 'orderIncrementalIndexingSchedule', 'profileIncrementalIndexingSchedule','orderOptimizationSchedule','profileOptimizationSchedule'
-
scheduleType(optional):
string
Schedule type could be periodic or calendar
Nested Schema : schedule
Type:
Show Source
object
-
period(optional):
integer
It contains value in milliseconds.
Example Response (application/json)
{
"setUpRunning":true,
"scheduledJobsInputData":[
{
"schedule":{
"period":1000000,
"catchUp":false
},
"scheduledJobName":"profileIncrementalIndexingSchedule",
"scheduleType":"periodic",
"scheduleDescription":"every 1000 seconds without catch up"
},
{
"schedule":{
"daysInMonth":[
],
"weeksInMonth":[
1,
2,
3,
4,
5
],
"monthsInYear":[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"daysOfWeek":[
1,
2,
3,
4,
5,
6,
7
],
"occurrenceInDay":2
},
"scheduledJobName":"orderOptimizationSchedule",
"scheduleType":"calendar",
"scheduleDescription":"months:Jan-Dec dates: daysOfWeek:Sun-Sat occurrencesInMonth:1-last hours:11,23 minutes:0"
},
{
"schedule":{
"daysInMonth":[
],
"weeksInMonth":[
1,
2,
3
],
"monthsInYear":[
1,
3
],
"daysOfWeek":[
1,
2,
3
],
"occurrenceInDay":2
},
"scheduledJobName":"profileOptimizationSchedule",
"scheduleType":"calendar",
"scheduleDescription":"months:Feb,Apr dates: daysOfWeek:Sun-Tue occurrencesInMonth:1-3 hours:11,23 minutes:0"
},
{
"schedule":{
"period":1000000,
"catchUp":false
},
"scheduledJobName":"orderIncrementalIndexingSchedule",
"scheduleType":"periodic",
"scheduleDescription":"every 1000 seconds without catch up"
}
],
"errorMessage":"",
"enabled":false,
"statusMessage":"Text Search setup has been successfully initiated with the given scheduledJobs input data. Once the setup is completed 'enabled' will be true."
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|100007|Could not perform text search configuration as another text search setup is currently in progress.|
|100008|enable flag is required.|
|100009|scheduledJobName field in scheduledJobs is required.|
|100010|Could not perform text search configuration as similar internal operation is currently in progress.|
|100011|Invalid scheduled Job Name: {0}|
|53000|Unable to create or update schedule information.|
|53001|Missing required property: scheduleType/schedule (or) Invalid input for the schedule (or) Invalid schedule type property found. It should be either calendar or periodic.|
|53006|Unable to remove schedule information.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code