...
Recommend similar items
GET/POST https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/items/recommend
Returns a recommendation of similar items from the project given an item id or text.
Parameters: | - tenant – User tenant.
- project_id – Project identifier.
|
---|
JSON Data: | Data is passed in as a JSON object. Valid object keys: |
---|
Headers: | See Common Headers. |
---|
Status Codes: | See also Common Status Codes. |
---|
Returns: | Results. Response fields: - items – List of items.
- now – Timestamp for the event of response generation.
- count – The number of items returned with this result set.
- total – Total number of items in recommendation result
- method –Method used for recommendation
- master_item –Original item used to get recommendation
- time_ms – Time of execution main component of recommendation in millisecond.
{
"count" : 2,
"total" : 5,
"items" : [
{
"title" : "How Do I Get a Mortgage?" ,
"read" : false ,
"created_at" : "2017-04-26T19:02:17" ,
"related_items" : [
],
"score" : 37.719635,
"external_id" : "5900eebc95d0e024b586d7d8" ,
"id" : "CPIalbwkobYkwjwzzkWcGw"
},
{
"title" : "How Do I Get a Good Interest Rate?" ,
"read" : false ,
"created_at" : "2017-04-26T19:04:01" ,
"related_items" : [
],
"score" : 26.451519,
"external_id" : "5900ef2a95d0e024b586d7dc" ,
"id" : "YiBhdq04vzu9nSkDK05GAw"
},
],
"master_item" : {
"title" : "What Kind of Mortgage Should I Get?" ,
"read" : true ,
"created_at" : "2017-04-26T19:03:03" ,
"related_items" : [
],
"score" : null ,
"external_id" : "5900eeea95d0e024b586d7d9" ,
"id" : "nul6nurQKGOJIdphYRYAjg"
},
"time_ms" : {
"query" : 31,
"master_item" : 268
},
"now" : "2017-11-07T09:04:49.699453" ,
"method" : "mlt"
}
|
|
---|
Recommendation methods
GET https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/items/recommend/methods
Returns the supported recommendation methods for items from the project.
Parameters: | - tenant – User tenant.
- project_id – Project identifier.
|
---|
Headers: | See Common Headers. |
---|
Status Codes: | See also Common Status Codes. |
---|
Returns: | Method names. Response fields: - methods – List of method names.
- default – The default that would be chosen for this project.
{
"methods" : ["smartfilter", "mlt", "tfidf"],
"default": "smartfilter"
}
|
|
---|
...