fix search doc links and code

This commit is contained in:
Xavier Léauté 2013-11-22 15:53:39 -08:00
parent 51c0393455
commit 40af9df0d4
2 changed files with 47 additions and 45 deletions

View File

@ -3,26 +3,27 @@ layout: doc_page
---
A search query returns dimension values that match the search specification.
<code>{
"queryType": "search",
"dataSource": "sample_datasource",
"granularity": "day",
"searchDimensions": [
"dim1",
"dim2"
],
"query": {
"type": "insensitive_contains",
"value": "Ke"
},
"sort" : {
"type": "lexicographic"
},
"intervals": [
"2013-01-01T00:00:00.000/2013-01-03T00:00:00.000"
]
}
</code>
```json
{
"queryType": "search",
"dataSource": "sample_datasource",
"granularity": "day",
"searchDimensions": [
"dim1",
"dim2"
],
"query": {
"type": "insensitive_contains",
"value": "Ke"
},
"sort" : {
"type": "lexicographic"
},
"intervals": [
"2013-01-01T00:00:00.000/2013-01-03T00:00:00.000"
]
}
```
There are several main parts to a search query:
@ -40,32 +41,33 @@ There are several main parts to a search query:
The format of the result is:
<code>[
```json
[
{
"timestamp": "2012-01-01T00:00:00.000Z",
"result": [
{
"timestamp": "2012-01-01T00:00:00.000Z",
"result": [
{
"dimension": "dim1",
"value": "Ke$ha"
},
{
"dimension": "dim2",
"value": "Ke$haForPresident"
}
]
"dimension": "dim1",
"value": "Ke$ha"
},
{
"timestamp": "2012-01-02T00:00:00.000Z",
"result": [
{
"dimension": "dim1",
"value": "SomethingThatContainsKe"
},
{
"dimension": "dim2",
"value": "SomethingElseThatContainsKe"
}
]
"dimension": "dim2",
"value": "Ke$haForPresident"
}
]
</code>
},
{
"timestamp": "2012-01-02T00:00:00.000Z",
"result": [
{
"dimension": "dim1",
"value": "SomethingThatContainsKe"
},
{
"dimension": "dim2",
"value": "SomethingElseThatContainsKe"
}
]
}
]
```

View File

@ -40,7 +40,7 @@ h2. Querying
** "GroupByQuery":./GroupByQuery.html
*** "OrderBy":./OrderBy.html
*** "Having":./Having.html
** "SearchQuery":./Having.html
** "SearchQuery":./SearchQuery.html
*** "SearchQuerySpec":./SearchQuerySpec.html
** "SegmentMetadataQuery":./SegmentMetadataQuery.html
** "TimeBoundaryQuery":./TimeBoundaryQuery.html