home / 24ways-fts4

24ways-fts4

Custom SQL query returning 5 rows

Query parameters

titleauthordecode_matchinfo(matchinfo(articles_fts, "pcx"))json_object("pre", annotate_matchinfo(matchinfo(articles_fts, "pcx"), "pcx"))
Geotag Everywhere with Fire Eagle Ben Ward [2, 3, 0, 2, 2, 0, 0, 0, 1, 163, 31, 0, 2, 2, 0, 0, 0, 2, 92, 21]
{
  "p": {
    "value": 2,
    "title": "Number of matchable phrases in the query",
    "idx": 0
  },
  "c": {
    "value": 3,
    "title": "Number of user defined columns in the FTS table",
    "idx": 1
  },
  "x": {
    "value": [
      {
        "phrase_index": 0,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          2,
          3,
          4
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          5,
          6,
          7
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 2,
        "hits_this_column_this_row": 1,
        "hits_this_column_all_rows": 163,
        "docs_with_hits": 31,
        "idxs": [
          8,
          9,
          10
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          11,
          12,
          13
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          14,
          15,
          16
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 2,
        "hits_this_column_this_row": 2,
        "hits_this_column_all_rows": 92,
        "docs_with_hits": 21,
        "idxs": [
          17,
          18,
          19
        ]
      }
    ],
    "title": "Details for each phrase/column combination"
  }
}
Unobtrusively Mapping Microformats with jQuery Simon Willison [2, 3, 1, 2, 2, 0, 0, 0, 39, 163, 31, 0, 2, 2, 0, 0, 0, 6, 92, 21]
{
  "p": {
    "value": 2,
    "title": "Number of matchable phrases in the query",
    "idx": 0
  },
  "c": {
    "value": 3,
    "title": "Number of user defined columns in the FTS table",
    "idx": 1
  },
  "x": {
    "value": [
      {
        "phrase_index": 0,
        "column_index": 0,
        "hits_this_column_this_row": 1,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          2,
          3,
          4
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          5,
          6,
          7
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 2,
        "hits_this_column_this_row": 39,
        "hits_this_column_all_rows": 163,
        "docs_with_hits": 31,
        "idxs": [
          8,
          9,
          10
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          11,
          12,
          13
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          14,
          15,
          16
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 2,
        "hits_this_column_this_row": 6,
        "hits_this_column_all_rows": 92,
        "docs_with_hits": 21,
        "idxs": [
          17,
          18,
          19
        ]
      }
    ],
    "title": "Details for each phrase/column combination"
  }
}
Front-End Code Reusability with CSS and JavaScript Trevor Morris [2, 3, 0, 2, 2, 0, 0, 0, 14, 163, 31, 0, 2, 2, 0, 0, 0, 1, 92, 21]
{
  "p": {
    "value": 2,
    "title": "Number of matchable phrases in the query",
    "idx": 0
  },
  "c": {
    "value": 3,
    "title": "Number of user defined columns in the FTS table",
    "idx": 1
  },
  "x": {
    "value": [
      {
        "phrase_index": 0,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          2,
          3,
          4
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          5,
          6,
          7
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 2,
        "hits_this_column_this_row": 14,
        "hits_this_column_all_rows": 163,
        "docs_with_hits": 31,
        "idxs": [
          8,
          9,
          10
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          11,
          12,
          13
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          14,
          15,
          16
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 2,
        "hits_this_column_this_row": 1,
        "hits_this_column_all_rows": 92,
        "docs_with_hits": 21,
        "idxs": [
          17,
          18,
          19
        ]
      }
    ],
    "title": "Details for each phrase/column combination"
  }
}
Finding Your Way with Static Maps Drew McLellan [2, 3, 0, 2, 2, 0, 0, 0, 1, 163, 31, 1, 2, 2, 0, 0, 0, 11, 92, 21]
{
  "p": {
    "value": 2,
    "title": "Number of matchable phrases in the query",
    "idx": 0
  },
  "c": {
    "value": 3,
    "title": "Number of user defined columns in the FTS table",
    "idx": 1
  },
  "x": {
    "value": [
      {
        "phrase_index": 0,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          2,
          3,
          4
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          5,
          6,
          7
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 2,
        "hits_this_column_this_row": 1,
        "hits_this_column_all_rows": 163,
        "docs_with_hits": 31,
        "idxs": [
          8,
          9,
          10
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 0,
        "hits_this_column_this_row": 1,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          11,
          12,
          13
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          14,
          15,
          16
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 2,
        "hits_this_column_this_row": 11,
        "hits_this_column_all_rows": 92,
        "docs_with_hits": 21,
        "idxs": [
          17,
          18,
          19
        ]
      }
    ],
    "title": "Details for each phrase/column combination"
  }
}
Your jQuery: Now With 67% Less Suck Scott Kosman [2, 3, 1, 2, 2, 0, 0, 0, 19, 163, 31, 0, 2, 2, 0, 0, 0, 2, 92, 21]
{
  "p": {
    "value": 2,
    "title": "Number of matchable phrases in the query",
    "idx": 0
  },
  "c": {
    "value": 3,
    "title": "Number of user defined columns in the FTS table",
    "idx": 1
  },
  "x": {
    "value": [
      {
        "phrase_index": 0,
        "column_index": 0,
        "hits_this_column_this_row": 1,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          2,
          3,
          4
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          5,
          6,
          7
        ]
      },
      {
        "phrase_index": 0,
        "column_index": 2,
        "hits_this_column_this_row": 19,
        "hits_this_column_all_rows": 163,
        "docs_with_hits": 31,
        "idxs": [
          8,
          9,
          10
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 0,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 2,
        "docs_with_hits": 2,
        "idxs": [
          11,
          12,
          13
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 1,
        "hits_this_column_this_row": 0,
        "hits_this_column_all_rows": 0,
        "docs_with_hits": 0,
        "idxs": [
          14,
          15,
          16
        ]
      },
      {
        "phrase_index": 1,
        "column_index": 2,
        "hits_this_column_this_row": 2,
        "hits_this_column_all_rows": 92,
        "docs_with_hits": 21,
        "idxs": [
          17,
          18,
          19
        ]
      }
    ],
    "title": "Details for each phrase/column combination"
  }
}
Powered by Datasette · Query took 3.134ms