Getting a subset of content value attributes
When you query content, the response contains a default set of attributes. If you require only a subset of these content value attribuites, add a keyphrase field in your request. The following example shows you how to do this.
Searching for two articles about movies and returning only the titles
The following is a continuation of the querying other types of content example. In this example, you search for two articles using the keyphrase movies and want only their titles.
Here is the request:
RequestResponse
{
"query": {
"keyphrase": ["movies"]
},
"content": {
"article": {}
},
"n_item": 2
}Here is the response:
RequestResponse
{
"ts": 1480977544,
"rid": "response_id_q2",
"url": "/searchpage?keyphrase=movies&content=article",
"query2id": {
"keyphrase": "keyphrase_id_movies"
},
"content": {
"article": {
"value": [
{"title": "Top 10 movie for 2016", "author": "John Smith", "published_data": "2016-12-31"},
{"title": "Finding memo review", "category_name": "movie review"}
]
}
},
"n_item": 2,
"total_item": 3,
"page_number": 1,
"total_page": 2
}The response has only a subset of the attributes although it searches through all attributes. In this example, the response returns Finding memo review because it belongs to the movie review category.