Back to main page



Get expression defines what items are returned as query results. By default, the hits are from the table defined in 'from' clause. In some cases, you may want to declare propositions like 'query is laptop' in impression table, while returning results from the separate products table, based on click likelihood. In this case, you may have query like

  "from": "impressions",
  "orderBy": {"$p":{"$context":{"click:true}}}

The get expression takes a field name as a parameter. If the field is link, the returned results are from the linked table. If the field is not link, the field values are returned as results.

Normally, the result of a query consists of the field values that best fulfill the query conditions. Field analyzers extract features from text fields and the $feature property can be used to return features instead of complete field values. For instance, the following example demonstrates how to discover product tags which are likely to lead to sales:

  "from": "impressions",
  "where":{"query":"cheap phone"},
  "orderBy": {"$p":{"$context":{"click:true}}}

The $feature syntax also allows you to examine the values/features of a link field like it would be a regular field.



Example 1:


Example 2:


Example 3:


Example 4:


Example 5:


Example 6:


Example 7: