Elastic search for pattern
Analysis / Text Dashboard
Elastic search for pattern
Description
Query text responses given a pattern and optional sentiment filters. Optionally find synonyms or antonyms.
Payload
{
"projectId": string,
"pattern": string,
"questionId": [string],
"wordType": string,
"sentiment": [
"vpos",
"pos",
"neu",
"neg",
"vneg"
],
"conceptTestsDisplayed": array
}
where:
projectId: unique identifier of the project. (Required).pattern: term to query responses for. (Required).questionId: single element array containing the unique identifier of the text question. (Required).wordType: can be “none”, “synonym”, or “antonym”. “none” searches for the provided pattern, “synonym” searches for synonyms of the pattern, and “antonym” searches for antonyms of the pattern. If not specified, this will be treated as “none”. (Optional).sentiment: an array containing any of the following elements: “vpos”, “pos”, “neu”, “neg”, and “vneg”. “vpos” is very positive, “pos” is positive, “neu” is neutral, “neg” is negative, and “vneg” is very negative. The service queries only responses with the selected sentiment parameters. (Required).conceptTestsDisplayed: an array describing which responses within concept tests to query. (Optional).
Responses
200 OK
{
"result": [
{
"matches": [
"string"
],
"fullText": "string",
"sentiment": "string",
"questionId": "string",
"responseId": "string",
"_score": "float"
}
]
}
where:
result: array of objects, where each object is of the following structure:- object:
matches: string array consisting of matches wrapped in html<em>tags.fullText: full response text of the found matchsentiment: sentiment tag of the response of the found match (vpos, pos, neu, neg, vneg).questionId: unique identifier of the text question.responseId: unique identifier of the response of the found match._score: calculated score of the found match as a floating point number.
- object:
401 Unauthorized
Invalid authorization.
500 Internal Server Error
An error occurred processing the request.
502 Bad Gateway
Invalid or missing parameters, or other internal error.
POST
Elastic search for pattern
Description
Query text responses given a pattern and optional sentiment filters. Optionally find synonyms or antonyms.Payload
projectId: unique identifier of the project. (Required).pattern: term to query responses for. (Required).questionId: single element array containing the unique identifier of the text question. (Required).wordType: can be “none”, “synonym”, or “antonym”. “none” searches for the provided pattern, “synonym” searches for synonyms of the pattern, and “antonym” searches for antonyms of the pattern. If not specified, this will be treated as “none”. (Optional).sentiment: an array containing any of the following elements: “vpos”, “pos”, “neu”, “neg”, and “vneg”. “vpos” is very positive, “pos” is positive, “neu” is neutral, “neg” is negative, and “vneg” is very negative. The service queries only responses with the selected sentiment parameters. (Required).conceptTestsDisplayed: an array describing which responses within concept tests to query. (Optional).
Responses
200 OK
result: array of objects, where each object is of the following structure:- object:
matches: string array consisting of matches wrapped in html<em>tags.fullText: full response text of the found matchsentiment: sentiment tag of the response of the found match (vpos, pos, neu, neg, vneg).questionId: unique identifier of the text question.responseId: unique identifier of the response of the found match._score: calculated score of the found match as a floating point number.
- object:
401 Unauthorized
Invalid authorization.
500 Internal Server Error
An error occurred processing the request.
502 Bad Gateway
Invalid or missing parameters, or other internal error.