{"id":1313,"date":"2026-09-14T15:28:53","date_gmt":"2026-09-14T15:28:53","guid":{"rendered":"https:\/\/boochlin.com\/?p=1313"},"modified":"2026-09-14T15:56:59","modified_gmt":"2026-09-14T15:56:59","slug":"funny-vote-app-%e4%ba%94%e7%be%8e%e5%85%83%e4%bc%ba%e6%9c%8d%e5%99%a8%e9%99%a3%e4%ba%a1%e5%be%8c%ef%bc%9a%e7%94%a8-firebase-%e8%88%87%e8%80%81%e5%88%86%e6%94%af%e7%ba%8c%e5%91%bd%e7%9a%84","status":"publish","type":"post","link":"https:\/\/boochlin.com\/?p=1313","title":{"rendered":"Funny vote APP \u2013 \u4e94\u7f8e\u5143\u4f3a\u670d\u5668\u9663\u4ea1\u5f8c\uff1a\u7528 Firebase \u8207\u8001\u5206\u652f\u7e8c\u547d\u7684\u96f2\u7aef\u63db\u5fc3\u96dc\u8a18\uff08\u516d\uff09"},"content":{"rendered":"<p>\u4e0a\u4e00\u7bc7\u804a\u5230\u6211\u5011\u5728 <code>modern-android<\/code> \u5206\u652f\u4e0a\u82b1\u4e86\u5e7e\u9031\u6642\u9593\uff0c\u8010\u8457\u6027\u5b50\u628a\u5341\u5e74\u524d\u7684 6 \u9801\u6559\u5b78\u3001\u81ea\u8a02\u5206\u4eab\u8207\u689d\u6b3e\u9801\u9762 100% \u5fa9\u523b\u5b8c\u6210\uff0c\u4e26\u5728 Samsung S23 \u5be6\u9ad4\u6a5f\u4e0a\u8dd1\u51fa\u4e86\u4e00\u689d\u7da0\u7dda\u6ed1\u5230\u5e95\u7684 120fps \u6975\u81f4\u6d41\u66a2\u5ea6\u3002<\/p>\n<p>\u4f46\u5728\u72c2\u559c\u4e4b\u5f8c\uff0c\u8fce\u9762\u800c\u4f86\u7684\u662f\u4e00\u8a18\u6975\u5ea6\u5c37\u5c2c\u7684\u73fe\u5be6\uff1a\u5341\u5e74\u524d\u597d\u53cb JJJ \u5beb\u7684 PHP \u5f8c\u7aef\uff0c\u9023\u540c\u67b6\u5728 DigitalOcean \u6bcf\u500b\u6708\u4e94\u7f8e\u5143\u7684\u4e3b\u6a5f\uff0c\u65e9\u5728\u516b\u5e74\u524d\u5c31\u56e0\u70ba\u6b20\u8cbb\u88ab\u6574\u53f0\u683c\u5f0f\u5316\u4e86\uff1b\u9023 <code>funny-vote.com<\/code> \u7684\u7db2\u5740\u90fd\u65e9\u5c31\u904e\u671f\u88ab\u7db2\u5740\u87d1\u8782\u6436\u8d70\u4e86\u3002<\/p>\n<p>\u524d\u53f0\u523b\u5f97\u50cf\u73fe\u4ee3\u9802\u7d1a\u8dd1\u8eca\uff0c\u5f8c\u7aef\u9023\u5f15\u64ce\u90fd\u6c92\u6709\u3002\u9019\u4e0b\u5c37\u5c2c\u4e86\uff0c\u96e3\u9053\u6211\u5011\u8f9b\u8f9b\u82e6\u82e6\u523b\u5b8c\u7684 App\uff0c\u53ea\u80fd\u770b\u8457\u4e00\u5806 Mock \u8cc7\u6599\u81ea\u55e8\u55ce\uff1f<\/p>\n<p>\u300c\u6020\u60f0\u662f\u958b\u767c\u7684\u6e90\u982d\uff0c\u8853\u696d\u6709\u5c08\u653b\u300d\uff0c\u8eab\u70ba\u4e00\u500b Android \u524d\u7aef\u5de5\u7a0b\u5e2b\uff0c\u6211\u53ea\u60f3\u5b89\u5b89\u975c\u975c\u5beb\u5ba2\u6236\u7aef\u3002\u8981\u6211\u70ba\u4e86\u9019\u500b\u8001\u5c08\u6848\u53bb\u79df\u4e00\u53f0 Linux \u4e3b\u6a5f\u3001\u88dd Docker\u3001\u8abf Nginx\u3001\u914d MySQL \u9023\u7dda\u6c60\uff0c\u534a\u591c\u9084\u8981\u64d4\u5fc3\u4f3a\u670d\u5668\u7576\u6a5f\u88ab\u53eb\u8d77\u4f86\u5c3f\u5c3f\uff1f\u9580\u90fd\u6c92\u6709\u3002<\/p>\n<p>\u9019\u7bc7\u5c31\u4f86\u804a\u804a\uff0c\u6211\u662f\u600e\u9ebc\u7528 Google \u7684 Firebase Firestore\uff0c\u5728\u4e00\u884c\u5f8c\u7aef\u4ee3\u78bc\u90fd\u4e0d\u7528\u5beb\u7684\u524d\u63d0\u4e0b\uff0c\u7d66\u9019\u6b3e\u6b7b\u900f\u4e86\u5341\u5e74\u7684\u8001\u53e4\u8463\u63db\u4e0a\u4e00\u9846\u9ad8\u53ef\u7528\u3001\u81ea\u5e36\u5373\u6642\u63a8\u9001\u7684\u96f2\u539f\u751f\u5fc3\u81df\uff1b\u751a\u81f3\u624b\u7662\u70ba\u5341\u5e74\u524d\u7684\u56db\u500b\u8001\u67b6\u69cb\u5206\u652f\u5168\u6578\u7e8c\u547d\u7684\u6298\u9a30\u6b77\u7a0b\u3002<\/p>\n<hr \/>\n<h2>\u4e00\u3001 \u70ba\u4ec0\u9ebc\u662f Firebase Firestore\uff1f\u6020\u60f0\u5de5\u7a0b\u5e2b\u7684\u7cbe\u660e\u7b97\u76e4<\/h2>\n<p>\u5728\u6c7a\u5b9a\u91cd\u69cb\u5f8c\u7aef\u7684\u90a3\u5929\u6df1\u591c\uff0c\u6211\u7d66\u81ea\u5df1\u5217\u4e86\u4e09\u500b\u5e95\u7dda\u539f\u5247\uff1a<\/p>\n<ol>\n<li><strong>\u96f6\u4f3a\u670d\u5668\u904b\u7dad\uff08Serverless\uff09<\/strong>\uff1a\u6211\u4e0d\u8981\u7ba1\u4efb\u4f55 Linux \u6307\u4ee4\uff0c\u4e0d\u8981\u7ba1\u9632\u8b77\u7246\uff0c\u4e0d\u8981\u7ba1\u8cc7\u6599\u5eab\u5099\u4efd\u3002<\/li>\n<li><strong>\u771f\u6b63\u7684\u5373\u6642\u958b\u7968\u9ad4\u9a57<\/strong>\uff1a\u6295\u7968 App \u6700\u8ff7\u4eba\u7684\u5730\u65b9\uff0c\u5728\u65bc\u300c\u6211\u6295\u4e0b\u4e00\u7968\u7684\u77ac\u9593\uff0c\u8eab\u908a\u670b\u53cb\u7684\u624b\u6a5f\u7acb\u523b\u8df3\u52d5\u6700\u65b0\u5f97\u7968\u6578\u300d\u3002\u5728 2016 \u5e74\u6211\u5011\u662f\u7528\u8f2a\u8a62\uff08Polling\uff09\u9019\u7a2e\u8822\u65b9\u6cd5\u786c\u5e79\uff0c\u6bcf\u9694\u5e7e\u79d2\u5c31\u767c\u4e00\u6b21 HTTP \u8acb\u6c42\uff1b\u5728 2026 \u5e74\uff0c\u5168\u96d9\u5de5 WebSocket \u6216 Server-Sent Events \u662f\u6a19\u914d\u3002<\/li>\n<li><strong>\u4e0d\u7528\u82b1\u9322\uff08\u6216\u8005\u82b1\u5f97\u6975\u5c11\uff09<\/strong>\uff1a\u9019\u7d14\u7cb9\u662f\u500b\u81f4\u656c\u9752\u6625\u7684\u91cd\u69cb\u5c08\u6848\uff0c\u6bcf\u500b\u6708\u767d\u767d\u71d2\u5e7e\u5341\u584a\u7f8e\u91d1\u53bb\u990a\u96f2\u7aef\u4f3a\u670d\u5668\uff0c\u5c0f\u5f1f\u6211\u7684\u8377\u5305\u6703\u54ed\u3002<\/li>\n<\/ol>\n<p>\u6311\u4f86\u9078\u53bb\uff0cFirebase \u7684 Cloud Firestore \u6210\u4e86\u552f\u4e00\u7684\u89e3\u7b54\u3002\u5b83\u7684\u514d\u8cbb\u914d\u984d\uff08Spark Plan\uff09\u6975\u5ea6\u6177\u6168\uff1a\u6bcf\u5929 50,000 \u6b21\u8b80\u53d6\u300120,000 \u6b21\u5beb\u5165\u30011GB \u5132\u5b58\u7a7a\u9593\u3002\u5c0d\u65bc\u4e00\u500b\u91cd\u65b0\u5fa9\u6d3b\u7684\u7368\u7acb App \u4f86\u8aaa\uff0c\u9019\u500b\u984d\u5ea6\u8db3\u5920\u5728\u96f2\u7aef\u8eba\u5e73\u8dd1\u4e0a\u597d\u5e7e\u5e74\uff0c\u4e00\u6bdb\u9322\u90fd\u4e0d\u7528\u82b1\u3002<\/p>\n<p>\u4f46\u5929\u4e0b\u6c92\u6709\u767d\u5403\u7684\u5348\u9910\u3002\u5f9e\u5341\u5e74\u524d\u7684\u95dc\u806f\u5f0f\u8cc7\u6599\u5eab\uff08MySQL\uff09\u8df3\u5230 NoSQL Document-based \u8cc7\u6599\u5eab\uff0c\u5982\u679c\u76f4\u63a5\u7167\u642c\u8001\u601d\u7dad\uff0c\u4fdd\u8b49\u6703\u8e29\u5f97\u6eff\u8173\u6ce5\u3002<\/p>\n<hr \/>\n<h2>\u4e8c\u3001 Firestore \u8cc7\u6599\u6a21\u578b\u8a2d\u8a08\uff1a\u5f9e\u8868\u683c\u95dc\u806f\u5230\u53cd\u6b63\u898f\u5316\u5feb\u53d6<\/h2>\n<p>\u5728\u5341\u5e74\u524d\u7684 MySQL \u88e1\uff0c\u6211\u5011\u7fd2\u6163\u958b <code>votes<\/code> \u8868\u683c\u3001<code>options<\/code> \u8868\u683c\u3001<code>voters<\/code> \u8868\u683c\uff0c\u7136\u5f8c\u7528 <code>LEFT JOIN<\/code> \u8207\u5916\u9375\u786c\u6e4a\u51fa\u8cc7\u6599\u3002\u4f46\u5728 Firestore \u88e1\uff0c\u6bcf\u4e00\u6b21 Document \u8b80\u53d6\u90fd\u662f\u8981\u8a08\u8cbb\uff08\u6216\u6d88\u8017\u514d\u8cbb\u984d\u5ea6\uff09\u7684\uff0c\u800c\u4e14\u8de8\u96c6\u5408 JOIN \u6839\u672c\u4e0d\u5b58\u5728\u3002<\/p>\n<p>\u6211\u5011\u5728 <code>feature\/firebase-backend<\/code> \u5206\u652f\u4e0a\uff0c\u78ba\u7acb\u4e86\u300c\u4e3b\u96c6\u5408 + \u5b50\u96c6\u5408 + \u53cd\u6b63\u898f\u5316\u6458\u8981\u300d\u7684\u9ad8\u6548\u7d50\u69cb\uff1a<\/p>\n<h3>1. \u6295\u7968\u4e3b\u96c6\u5408\uff1a\/polls\/{pollId}<\/h3>\n<p>\u5b58\u653e\u6295\u7968\u7684\u57fa\u672c\u8cc7\u6599\u8207\u7d71\u8a08\u7e3d\u91cf\u3002\u70ba\u4e86\u907f\u514d\u4f7f\u7528\u8005\u6bcf\u6b21\u6ed1\u9032\u9996\u9801\uff0c\u7cfb\u7d71\u90fd\u8981\u760b\u72c2\u53bb\u8b80\u53d6\u5e95\u4e0b\u5e7e\u5341\u500b\u9078\u9805\u7684\u6587\u4ef6\uff0c\u6211\u5011\u628a\u5f97\u7968\u6700\u9ad8\u7684\u5169\u500b\u9078\u9805\uff08<code>topOptions<\/code>\uff09\u76f4\u63a5\u4ee5\u9663\u5217\u5f62\u5f0f\u53cd\u6b63\u898f\u5316\u5feb\u53d6\u5728\u4e3b\u6587\u6a94\u5167\uff1a<\/p>\n<pre><code class=\"language-json\">{\n  \"pollId\": \"poll_98a72b1c4e\",\n  \"title\": \"\u5348\u9910\u5403\u4ec0\u9ebc\uff1f\",\n  \"category\": \"hot\",\n  \"security\": \"00\",\n  \"authorId\": \"user_77a9c1\",\n  \"authorName\": \"Boochlin\",\n  \"totalVotes\": 142,\n  \"optionCount\": 4,\n  \"topOptions\": [\n    {\"optionId\": \"opt_1\", \"title\": \"\u96de\u6392\u4fbf\u7576\", \"voteCount\": 89},\n    {\"optionId\": \"opt_2\", \"title\": \"\u5df7\u53e3\u4e7e\u9eb5\", \"voteCount\": 53}\n  ],\n  \"searchKeywords\": [\"\u5348\u9910\", \"\u9910\u5403\", \"\u5403\u4ec0\", \"\u4ec0\u9ebc\"],\n  \"createdAt\": 1715839200000\n}<\/code><\/pre>\n<p>\u9019\u6a23\u8a2d\u8a08\u7684\u7cbe\u5999\u4e4b\u8655\u5728\u65bc\uff1a<strong>\u4f7f\u7528\u8005\u5728\u9996\u9801\u6ed1\u904e 20 \u5f35\u5361\u7247\uff0cFirestore \u53ea\u9700\u8981\u7cbe\u78ba\u8a08\u6578 20 \u6b21\u8b80\u53d6\uff01<\/strong>\u9996\u9801\u4e0d\u9700\u8981\u53bb\u78b0\u9078\u9805\u5b50\u96c6\u5408\uff0c\u5c31\u80fd\u76f4\u63a5\u628a\u524d\u5169\u540d\u71b1\u9580\u9078\u9805\u8207\u9577\u689d\u5716\u7e6a\u88fd\u5b8c\u7562\u3002\u9019\u624d\u662f\u8eab\u70ba\u67b6\u69cb\u5e2b\u8a72\u66ff\u9322\u5305\u7701\u4e0b\u7684\u6210\u672c\u3002<\/p>\n<h3>2. \u9078\u9805\u5b50\u96c6\u5408\uff1a\/polls\/{pollId}\/options\/{optionId}<\/h3>\n<p>\u7576\u4f7f\u7528\u8005\u771f\u6b63\u9ede\u9032\u8a73\u60c5\u9801\u6642\uff0c\u624d\u900f\u904e\u5b50\u96c6\u5408\u76e3\u807d\u5b8c\u6574\u7684\u9078\u9805\u6e05\u55ae\uff1a<\/p>\n<pre><code class=\"language-json\">{\n  \"optionId\": \"opt_1\",\n  \"title\": \"\u96de\u6392\u4fbf\u7576\",\n  \"voteCount\": 89,\n  \"displayOrder\": 1,\n  \"creatorId\": \"user_77a9c1\"\n}<\/code><\/pre>\n<h3>3. \u9632\u5237\u7968\u5b58\u8b49\u5b50\u96c6\u5408\uff1a\/polls\/{pollId}\/voters\/{userId}<\/h3>\n<p>\u6295\u7968 App \u6700\u6838\u5fc3\u7684\u8cc7\u5b89\u5e95\u7dda\u5c31\u662f\uff1a<strong>\u4e00\u4eba\u53ea\u80fd\u6295\u4e00\u7968<\/strong>\u3002\u5341\u5e74\u524d\u8001\u5f8c\u7aef\u662f\u9760 PHP \u67e5 MySQL \u7684\u552f\u4e00\u7d22\u5f15\uff0c\u5982\u679c\u9023\u7dda\u4f75\u767c\u7a0d\u5fae\u9ad8\u4e00\u9ede\uff0c\u4f7f\u7528\u8005\u9023\u9ede\u5169\u4e0b\u87a2\u5e55\u5c31\u80fd\u6210\u529f\u704c\u7968\u3002<\/p>\n<p>\u5728 Firestore \u88e1\uff0c\u6211\u5011\u5229\u7528\u5b50\u96c6\u5408\u7684\u6587\u4ef6\u8def\u5f91\u552f\u4e00\u6027\uff1a\u76f4\u63a5\u5c07\u4f7f\u7528\u8005\u7684 <code>userId<\/code> \u4f5c\u70ba\u6587\u4ef6 ID\u3002\u5982\u679c\u9019\u500b\u6587\u4ef6\u5df2\u7d93\u5b58\u5728\uff0c\u4efb\u4f55\u91cd\u8907\u5beb\u5165\u90fd\u6703\u76f4\u63a5\u5728\u96f2\u7aef\u898f\u5247\u5c64\u88ab\u64cb\u4e0b\u4f86\u3002<\/p>\n<hr \/>\n<h2>\u4e09\u3001 \u6295\u7968\u4e8b\u52d9\uff08Transaction\uff09\uff1a\u9ad8\u4f75\u767c\u4e0b\u7684\u539f\u5b50\u6027\u6551\u8d16<\/h2>\n<p>\u5728\u5206\u6563\u5f0f\u7cfb\u7d71\u88e1\uff0c\u6700\u6015\u7684\u5c31\u662f Race Condition\uff08\u7af6\u722d\u689d\u4ef6\uff09\u3002\u8acb\u60f3\u50cf\u4e00\u4e0b\uff1a\u5982\u679c\u6709\u4e00\u767e\u500b\u4eba\u5728\u540c\u4e00\u79d2\u9418\u6309\u4e0b\u300c\u96de\u6392\u4fbf\u7576\u300d\uff0c\u7cfb\u7d71\u8a72\u600e\u9ebc\u4fdd\u8b49\u7968\u6578\u4e0d\u6703\u5c11\u7b97\uff1f<\/p>\n<p>\u5982\u679c\u5beb\u51fa\u300c\u5148\u8b80\u51fa\u7968\u6578 89\uff0c\u5728\u624b\u6a5f\u7aef\u7b97\u6210 90\uff0c\u518d\u5beb\u56de\u8cc7\u6599\u5eab\u300d\u9019\u7a2e\u5929\u771f\u4ee3\u78bc\uff0c\u5728\u4f75\u767c\u885d\u64ca\u4e0b\uff0c\u9019\u4e00\u767e\u7968\u6700\u5f8c\u53ef\u80fd\u53ea\u6703\u88ab\u7b97\u6210\u5169\u4e09\u7968\u3002<\/p>\n<p>\u5728 <code>FirestoreVoteDataSource.kt<\/code> \u4e2d\uff0c\u6211\u5011\u5229\u7528\u4e86 Firestore \u63d0\u4f9b\u7684\u539f\u5b50\u4e8b\u52d9\uff08Transaction\uff09\uff1a<\/p>\n<pre><code class=\"language-kotlin\">\/\/ \u6295\u7968\u6838\u5fc3\uff1a\u5728\u4ea4\u6613\u5305\u5167\u5b8c\u6210\u9632\u91cd\u8907\u6aa2\u67e5\u8207\u539f\u5b50\u6027\u8a08\u6578\noverride suspend fun submitVote(\n    voteCode: String,\n    optionIds: List&lt;String&gt;,\n    userId: String\n): Result&lt;Unit&gt; = runCatching {\n    val pollRef = pollsCollection.document(voteCode)\n    val voterRef = pollRef.collection(\"voters\").document(userId)\n\n    firestore.runTransaction { transaction -&gt;\n        \/\/ 1. \u60b2\u89c0\u9396\u6aa2\u67e5\uff1a\u78ba\u8a8d\u8a72\u7528\u6236\u662f\u5426\u5df2\u7d93\u6295\u904e\u7968\uff08\u4e00\u4eba\u4e00\u7968\u5e95\u7dda\uff09\n        val voterSnapshot = transaction.get(voterRef)\n        if (voterSnapshot.exists()) {\n            throw IllegalStateException(\"\u60a8\u5df2\u7d93\u53c3\u8207\u904e\u6b64\u6295\u7968\uff0c\u7121\u6cd5\u91cd\u8907\u6295\u7968\uff01\")\n        }\n\n        \/\/ 2. \u9078\u9805\u7968\u6578\u539f\u5b50\u6027\u905e\u589e\n        optionIds.forEach { optId -&gt;\n            val optionRef = pollRef.collection(\"options\").document(optId)\n            transaction.update(optionRef, \"voteCount\", FieldValue.increment(1))\n        }\n\n        \/\/ 3. \u7d2f\u8a08\u6240\u6709\u9078\u9805\u5f97\u7968\u7e3d\u6578\n        \/\/ \u8a3b\u89e3\u8aaa\u660e\uff1a\u5728\u591a\u9078\u6295\u7968\u4e2d\uff0c\u4e00\u4eba\u53ef\u6295\u591a\u7968\uff0ctotalVotes \u4ee3\u8868\u5168\u7ad9\u7d2f\u8a08\u6295\u51fa\u7684\u7e3d\u7968\u6578\uff08Ballots Cast\uff09\uff1b\n        \/\/ \u800c\u9632\u5237\u7968\u7684\u4e00\u4eba\u4e00\u6b21\u53c3\u8207\u8cc7\u683c\uff0c\u5247\u662f\u7531\u4e0b\u65b9 voters\/{userId} \u552f\u4e00\u8def\u5f91\u5b8c\u5168\u9396\u6b7b\u3002\n        transaction.update(pollRef, \"totalVotes\", FieldValue.increment(optionIds.size.toLong()))\n\n        \/\/ 4. \u7559\u4e0b\u9632\u5237\u7968\u6191\u64da\uff08\u8a18\u9304\u6295\u7968\u6642\u9593\u6233\u8a18\u8207\u9078\u4e2d\u7684\u9078\u9805\uff09\n        val voterData = mapOf(\n            \"userId\" to userId,\n            \"votedOptions\" to optionIds,\n            \"votedAt\" to FieldValue.serverTimestamp()\n        )\n        transaction.set(voterRef, voterData)\n    }.await()\n}<\/code><\/pre>\n<p>\u9019\u6bb5\u4ee3\u78bc\u7684\u5a01\u529b\u5728\u65bc\uff1a\u6574\u500b\u6aa2\u67e5\u8207\u7968\u6578\u905e\u589e\u662f\u5728\u96f2\u7aef\u9694\u96e2\u74b0\u5883\u4e0b\u4f5c\u70ba\u55ae\u4e00\u539f\u5b50\u64cd\u4f5c\u57f7\u884c\u7684\u3002\u53ea\u8981\u6709\u4efb\u4f55\u885d\u7a81\uff0c\u4ea4\u6613\u6703\u81ea\u52d5\u91cd\u8a66\uff1b\u800c\u4e00\u65e6\u6210\u529f\uff0c\u7968\u6578\u7d55\u5c0d\u4e0d\u6703\u907a\u5931\u6216\u591a\u7b97\u3002\u66f4\u68d2\u7684\u662f\uff0c\u900f\u904e <code>callbackFlow<\/code> \u76e3\u807d\uff0c\u5168\u53f0\u7063\u6240\u6709\u6253\u958b\u9019\u500b\u756b\u9762\u7684\u4f7f\u7528\u8005\uff0c\u624b\u6a5f\u4e0a\u7684\u9577\u689d\u5716\u6703\u5728\u540c\u4e00\u79d2\u9418\u81ea\u52d5\u5411\u524d\u6ed1\u52d5\uff0c\u723d\u5ea6\u76f4\u63a5\u62c9\u6eff\u3002<\/p>\n<hr \/>\n<h2>\u56db\u3001 \u653b\u514b Firestore \u6b98\u5ee2\u76f2\u9ede\uff1a\u5169\u968e\u6bb5 Bi-gram \u6aa2\u7d22\u5be6\u6230<\/h2>\n<p>\u7576\u6211\u5011\u628a\u6295\u7968\u8207\u5217\u8868\u5168\u90e8\u4e32\u63a5\u5b8c\u7562\u5f8c\uff0c\u649e\u4e0a\u4e86 Firestore \u6700\u5927\u7684\u5148\u5929\u7f3a\u9677\uff1a<strong>\u5b83\u5b8c\u5168\u4e0d\u652f\u63f4 LIKE \u6a21\u7cca\u641c\u5c0b\uff0c\u4e5f\u4e0d\u652f\u63f4\u4e2d\u6587\u5206\u8a5e\u6aa2\u7d22\uff01<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u5728\u95dc\u806f\u5f0f\u8cc7\u6599\u5eab\uff0c\u5beb\u4e00\u884c <code>WHERE title LIKE '%\u5348\u9910%'<\/code> \u5c31\u641e\u5b9a\u4e86\u3002\u4f46\u5728 Firestore \u88e1\uff0c\u4f60\u53ea\u80fd\u505a <code>==<\/code>\uff08\u5b8c\u5168\u76f8\u7b49\uff09\u6216\u8005\u5b57\u9996\u524d\u7db4\u6bd4\u5c0d\u3002\u5b98\u65b9\u6587\u4ef6\u901a\u5e38\u6703\u89aa\u5207\u5730\u5efa\u8b70\u4f60\uff1a\u300c\u8acb\u5916\u639b Algolia \u6216 ElasticSearch \u670d\u52d9\u300d\u3002\u770b\u5230\u9019\u884c\u5efa\u8b70\uff0c\u6211\u5fc3\u88e1\u53ea\u6709\u4e00\u53e5\u8a71\uff1a\u6211\u9023\u6bcf\u500b\u6708\u4e94\u7f8e\u5143\u7684 VPS \u90fd\u61f6\u5f97\u7e8c\u8cbb\u4e86\uff0c\u4f60\u53eb\u6211\u53bb\u8cb7\u6bcf\u500b\u6708\u5341\u5e7e\u584a\u7f8e\u91d1\u7684\u641c\u5c0b\u5916\u639b\uff1f<\/p>\n<p>\u8eab\u70ba\u5de5\u7a0b\u5e2b\uff0c\u300c\u6020\u60f0\u300d\u4e0d\u4ee3\u8868\u59a5\u5354\u3002\u6211\u6253\u958b Kotlin\uff0c\u624b\u523b\u51fa\u4e86\u4e00\u5957\u96f6\u6210\u672c\u7684\u96d9\u5b57\u5143\uff08Bi-gram\uff09\u5207\u8a5e\u5f15\u64ce <code>NgramUtil<\/code>\uff1a<\/p>\n<pre><code class=\"language-kotlin\">\/\/ \u624b\u523b Bi-gram \u4e2d\u6587\u5207\u8a5e\u5f15\u64ce\nobject NgramUtil {\n    private const val MAX_INPUT_LENGTH = 60\n\n    fun generateBiGrams(text: String): List&lt;String&gt; {\n        val clean = text.trim().take(MAX_INPUT_LENGTH)\n        if (clean.length &lt; 2) return if (clean.isEmpty()) emptyList() else listOf(clean)\n        val ngrams = mutableSetOf&lt;String&gt;()\n        for (i in 0 until clean.length - 1) {\n            ngrams.add(clean.substring(i, i + 2).lowercase())\n        }\n        return ngrams.toList()\n    }\n}<\/code><\/pre>\n<p>\u767c\u8d77\u6295\u7968\u300c\u4eca\u5929\u5348\u9910\u5403\u4ec0\u9ebc\u300d\u6642\uff0c\u81ea\u52d5\u5207\u788e\u6210\u9663\u5217 <code>[\"\u4eca\u5929\", \"\u5929\u5348\", \"\u5348\u9910\", \"\u9910\u5403\", \"\u5403\u4ec0\", \"\u4ec0\u9ebc\"]<\/code> \u5b58\u9032 <code>searchKeywords<\/code> \u6b04\u4f4d\u3002<\/p>\n<h3>\u81f4\u547d\u6280\u8853\u9677\u9631\uff1a\u70ba\u4ec0\u9ebc\u53ea\u9760 whereArrayContains \u6703\u7ffb\u8eca\uff1f<\/h3>\n<p>\u5f88\u591a\u5de5\u7a0b\u5e2b\u5728\u63a5\u5165 Firestore \u6642\uff0c\u4ee5\u70ba\u53ea\u8981\u5beb\u4e00\u884c\uff1a<\/p>\n<pre><code class=\"language-kotlin\">\/\/ \u5929\u771f\u932f\u8aa4\u5beb\u6cd5\uff1a\u67e5\u6e96\u7387\u76f4\u63a5\u6b78\u96f6\uff01\npollsCollection.whereArrayContains(\"searchKeywords\", ngrams.first()).get()<\/code><\/pre>\n<p>\u9019\u6bb5\u4ee3\u78bc\u96b1\u85cf\u8457\u6975\u81f4\u547d\u7684\u7f3a\u9677\uff1aFirestore \u7684 <code>whereArrayContains<\/code> <strong>\u53ea\u652f\u63f4\u55ae\u4e00\u5143\u7d20\u6bd4\u5c0d\uff0c\u4e14\u4e0d\u652f\u63f4\u591a\u689d\u4ef6 AND \u904b\u7b97<\/strong>\uff01<\/p>\n<p>\u5982\u679c\u4f7f\u7528\u8005\u641c\u5c0b\u300c2026 \u6700\u53d7\u6b61\u8fce\u52d5\u756b\u300d\uff0c<code>ngrams.first()<\/code> \u53d6\u51fa\u7684\u662f\u300c20\u300d\uff01Firestore \u6703\u628a\u6240\u6709\u6a19\u984c\u542b\u6709\u300c20\u300d\u7684\u7121\u95dc\u6295\u7968\uff08\u4f8b\u5982\u300c20\u5143\u4fbf\u7576\u300d\u3001\u300cTop 20 \u597d\u7269\u300d\uff09\u901a\u901a\u5012\u7d66\u4f60\uff0c\u67e5\u6e96\u7387\u76f4\u63a5\u5d29\u76e4\uff01<\/p>\n<h3>\u6b63\u7d71\u89e3\u6cd5\uff1a\u5169\u968e\u6bb5\u6aa2\u7d22\uff08\u96f2\u7aef\u7c97\u7be9 + \u5ba2\u6236\u7aef\u8a18\u61b6\u9ad4\u7cbe\u6e96\u904e\u6ffe\uff09<\/h3>\n<p>\u771f\u6b63\u7684\u751f\u7522\u7d1a\u67b6\u69cb\uff0c\u5fc5\u9808\u63a1\u7528\u5169\u968e\u6bb5\u904e\u6ffe\u7b56\u7565\uff1a<\/p>\n<pre><code class=\"language-kotlin\">\/\/ \u5169\u968e\u6bb5\u4e2d\u6587\u641c\u5c0b\u5be6\u6230\uff1a\u96f2\u7aef\u7c97\u7be9 + \u5ba2\u6236\u7aef\u8a18\u61b6\u9ad4\u7cbe\u6e96\u4e8c\u6b21\u904e\u6ffe\noverride fun searchVotes(query: String): Flow&lt;List&lt;VoteWithDetails&gt;&gt; = callbackFlow {\n    val cleanQuery = query.trim()\n    val searchBiGrams = NgramUtil.generateBiGrams(cleanQuery)\n    if (searchBiGrams.isEmpty()) {\n        trySend(emptyList())\n        close()\n        return@callbackFlow\n    }\n\n    \/\/ \u7b2c\u4e00\u968e\u6bb5\uff1a\u96f2\u7aef\u7c97\u7be9\n    \/\/ \u6311\u9078\u7279\u5fb5\u6700\u660e\u986f\u6216\u6700\u9577\u7684\u4e00\u500b Bi-gram \u4f5c\u70ba\u7d22\u5f15\u9375\uff0c\u7cbe\u78ba\u9396\u5b9a\u6700\u591a 30 \u7b46\u5019\u9078\u6587\u6a94\uff0c\u7bc0\u7701\u96f2\u7aef\u8b80\u53d6\u984d\u5ea6\n    val targetToken = searchBiGrams.maxByOrNull { it.length } ?: searchBiGrams.first()\n    val listenerRegistration = pollsCollection\n        .whereArrayContains(\"searchKeywords\", targetToken)\n        .limit(30)\n        .addSnapshotListener { snapshot, error -&gt;\n            if (error != null) {\n                close(error)\n                return@addSnapshotListener\n            }\n            if (snapshot != null) {\n                \/\/ \u7b2c\u4e8c\u968e\u6bb5\uff1a\u672c\u6a5f\u8a18\u61b6\u9ad4\u4e8c\u6b21\u7cbe\u6e96\u904e\u6ffe\n                \/\/ \u5728\u5ba2\u6236\u7aef\u8a18\u61b6\u9ad4\u4e2d\uff0c\u4fdd\u8b49\u6240\u6709\u5019\u9078\u6587\u6a94\u6a19\u984c\u5fc5\u9808\u5b8c\u6574\u5305\u542b\u4f7f\u7528\u8005\u8f38\u5165\u7684\u539f\u59cb\u5b57\u4e32\n                val filteredVotes = snapshot.documents\n                    .mapNotNull { mapDocToVoteWithDetails(it) }\n                    .filter { it.title.contains(cleanQuery, ignoreCase = true) }\n                \n                trySend(filteredVotes)\n            }\n        }\n    awaitClose { listenerRegistration.remove() }\n}<\/code><\/pre>\n<p>\u9019\u5957\u5169\u968e\u6bb5\u8a2d\u8a08\u517c\u5177\u4e86\u96f2\u7aef\u6210\u672c\u63a7\u5236\uff08\u4e00\u6b21\u67e5\u8a62\u6700\u591a\u6d88\u8017 30 \u6b21\u8b80\u53d6\u914d\u984d\uff09\u8207 100% \u641c\u5c0b\u7cbe\u6e96\u5ea6\u3002\u96f6\u5916\u639b\u8cbb\u7528\uff0c\u96f6\u7b2c\u4e09\u65b9\u4f9d\u8cf4\uff0c\u9019\u624d\u662f\u9ad8\u968e\u5de5\u7a0b\u5e2b\u8a72\u62ff\u51fa\u4f86\u7684\u89e3\u6cd5\u3002<\/p>\n<hr \/>\n<h2>\u4e94\u3001 \u7d42\u5c40\u5f69\u86cb\uff1a\u7d66\u5341\u5e74\u524d\u7684\u56db\u500b\u8001\u5206\u652f\u7e8c\u547d\uff0c\u8207\u8de8\u8d8a\u5341\u5e74\u7684\u4e09\u4ee3\u4ee3\u78bc\u5c0d\u6bd4<\/h2>\n<p>\u628a <code>modern-android<\/code> \u5206\u652f\u6210\u529f\u63db\u4e0a Firebase \u5f8c\uff0c\u770b\u8457\u96f2\u7aef\u63a7\u5236\u53f0\u88e1\u4e00\u7b46\u7b46\u5373\u6642\u8df3\u52d5\u7684\u8cc7\u6599\uff0c\u6211\u7a81\u7136\u8d77\u4e86\u4e00\u500b\u760b\u72c2\u7684\u5ff5\u982d\u3002<\/p>\n<p>\u5728\u6211\u5011\u9019\u500b\u5c08\u6848\u7684 Git \u6b77\u53f2\u88e1\uff0c\u6574\u6574\u9f4a\u9f4a\u6c89\u7761\u8457\u5341\u5e74\u524d\u7684\u56db\u500b\u8001\u67b6\u69cb\u5206\u652f\uff1a<br \/>\n&#8211; <code>mvp<\/code> (2016 Java \u7d14\u624b\u523b)<br \/>\n&#8211; <code>mvp_dagger<\/code> (2016 \u4f9d\u8cf4\u6ce8\u5165\u521d\u63a2)<br \/>\n&#8211; <code>mvp_rxjava<\/code> (2017 \u97ff\u61c9\u5f0f\u7ba1\u7dda)<br \/>\n&#8211; <code>mvp_kotlin<\/code> (2018 Kotlin 1.2 \u59cb\u7956)<\/p>\n<p>\u6211\u624b\u7662\u70ba\u9019\u56db\u500b\u8001\u5206\u652f\u5404\u62c9\u51fa\u4e86\u4e00\u500b <code>*_firebase<\/code> \u5206\u652f\uff0c\u628a\u7576\u5e74\u7684\u8cc7\u6599\u4f86\u6e90\u786c\u751f\u751f\u62bd\u63db\u6210 Firestore SDK\u3002\u800c\u5728\u5be6\u73fe\u540c\u4e00\u500b\u300c\u5f9e Firebase \u53d6\u5f97\u6295\u7968\u8a73\u60c5\u300d\u7684\u904e\u7a0b\u4e2d\uff0c\u6211\u6574\u7406\u51fa\u4e86\u9019\u4efd\u8de8\u8d8a\u5341\u5e74\u7684\u4e09\u4ee3\u4ee3\u78bc\u6f14\u9032\u5716\u9451\uff1a<\/p>\n<h3>1. 2016 \u5e74 Java 7\/8 \u56de\u547c\u5730\u7344\uff08Callback Hell\uff09<\/h3>\n<pre><code class=\"language-java\">\/\/ 2016 \u5e74\u7d93\u5178\u5beb\u6cd5\uff1aTask \u6eff\u5730\u56de\u547c\uff0c\u57f7\u884c\u7dd2\u5207\u63db\u5f97\u624b\u52d5\u4e1f\u56de\u4e3b\u57f7\u884c\u7dd2\nTasks.call(Executors.newSingleThreadExecutor(), new Callable&lt;Vote&gt;() {\n    @Override\n    public Vote call() throws Exception {\n        return fetchVoteFromFirestore(voteCode);\n    }\n}).addOnSuccessListener(new OnSuccessListener&lt;Vote&gt;() {\n    @Override\n    public void onSuccess(final Vote vote) {\n        runOnUiThread(new Runnable() {\n            @Override\n            public void run() {\n                view.showVoteDetail(vote); \/\/ \u56de\u5230\u4e3b\u57f7\u884c\u7dd2\u66f4\u65b0 UI\n            }\n        });\n    }\n}).addOnFailureListener(new OnFailureListener() {\n    @Override\n    public void onFailure(@NonNull Exception e) {\n        view.showError(e.getMessage());\n    }\n});<\/code><\/pre>\n<h3>2. 2017 \u5e74 RxJava 2 \u97ff\u61c9\u5f0f\u6a4b\u63a5\uff08Reactive Bridge\uff09<\/h3>\n<pre><code class=\"language-java\">\/\/ 2017 \u5e74\u89e3\u6cd5\uff1a\u7528 Single.create \u628a\u975e\u540c\u6b65\u56de\u547c\u786c\u5305\u88dd\u6210 Observable \u7ba1\u7dda\nSingle.&lt;Vote&gt;create(emitter -&gt; {\n    docRef.get().addOnSuccessListener(snapshot -&gt; {\n        Vote vote = snapshot.toObject(Vote.class);\n        if (vote != null) emitter.onSuccess(vote);\n        else emitter.onError(new NoSuchElementException());\n    }).addOnFailureListener(emitter::onError);\n})\n.subscribeOn(Schedulers.io())\n.observeOn(AndroidSchedulers.mainThread())\n.subscribe(vote -&gt; view.showVoteDetail(vote), error -&gt; view.showError(error.getMessage()));<\/code><\/pre>\n<h3>3. 2026 \u5e74 Kotlin \u5354\u7a0b\uff08Coroutines Suspend\uff09<\/h3>\n<pre><code class=\"language-kotlin\">\/\/ 2026 \u5e74\u73fe\u4ee3\u5beb\u6cd5\uff1a\u4e00\u884c await() \u512a\u96c5\u89e3\u6c7a\uff0c\u6c92\u6709\u56de\u547c\u3001\u6c92\u6709\u81a0\u6c34\u6a23\u677f\nsuspend fun getVoteDetail(voteCode: String): VoteWithDetails? {\n    return pollsCollection.document(voteCode).get().await().toObject(VoteWithDetails::class.java)\n}<\/code><\/pre>\n<p>\u770b\u8457\u9019\u4e09\u6bb5\u4ee3\u78bc\uff0c\u8edf\u9ad4\u5de5\u7a0b\u5341\u5e74\u9593\u7684\u6f14\u9032\u8e8d\u7136\u7d19\u4e0a\u3002\u5f9e Java \u56de\u547c\u5730\u7344\u7684\u75db\u82e6\u6399\u624e\uff0c\u5230 RxJava \u8a66\u5716\u7528\u7e41\u8907\u64cd\u4f5c\u7b26\u7406\u9806\u975e\u540c\u6b65\u908f\u8f2f\uff0c\u518d\u5230 Kotlin \u5354\u7a0b\u7528\u5e73\u92ea\u76f4\u6558\u7684\u9806\u5e8f\u8a9e\u6cd5\u5beb\u51fa\u975e\u540c\u6b65\u4ee3\u78bc\uff0c\u9019\u624d\u662f\u6280\u8853\u6f14\u9032\u5e36\u7d66\u5de5\u7a0b\u5e2b\u6700\u6df1\u523b\u7684\u5e78\u798f\u611f\u3002<\/p>\n<p>\u66f4\u91cd\u8981\u7684\u662f\uff0c\u9019\u9805\u5be6\u9a57\u8b49\u660e\u4e86\u9ad8\u5167\u805a\u3001\u4f4e\u8026\u5408\u67b6\u69cb\u7684\u7d42\u6975\u50f9\u503c\uff1a<strong>\u5341\u5e74\u524d\u6211\u5011\u5728\u5408\u7d04\u4ecb\u9762\uff08Contract\uff09\u4e0a\u4e0b\u7684\u529f\u592b\u6c92\u6709\u767d\u8cbb\u3002\u53ea\u8981\u4ecb\u9762\u5b9a\u7fa9\u5f97\u597d\uff0c\u696d\u52d9\u908f\u8f2f\u5b8c\u5168\u4e0d\u9700\u8981\u91cd\u5beb\uff0c\u5341\u5e74\u524d\u7684\u8001\u723a\u8eca\u63db\u4e0a\u73fe\u4ee3\u5674\u5c04\u5f15\u64ce\uff0c\u5728\u4eca\u5929\u4e00\u6a23\u80fd\u72c2\u98c6\u3002<\/strong><\/p>\n<hr \/>\n<h2>\u516d\u3001 \u7d50\u5c3e\uff1a\u96f2\u539f\u751f\u8dd1\u8d77\u4f86\u4e86\uff0c\u4f46\u8cc7\u5b89\u8b66\u5831\u97ff\u4e86<\/h2>\n<p>\u5341\u5e74\u524d\u6b7b\u900f\u4e86\u7684 App\uff0c\u5728 2026 \u5e74\u7d42\u65bc\u5fb9\u5e95\u6d3b\u4e86\u904e\u4f86\u3002\u5168\u7ad9\u7121\u4f3a\u670d\u5668\u67b6\u69cb\u3001\u5373\u6642\u63a8\u9001\u3001\u4e00\u4eba\u4e00\u7968\u3001\u5169\u968e\u6bb5\u4e2d\u6587\u641c\u5c0b\u3001\u8001\u5206\u652f\u5168\u6578\u5fa9\u6d3b\uff0c\u4e00\u5207\u770b\u8d77\u4f86\u90fd\u7f8e\u597d\u5f97\u4e0d\u50cf\u771f\u7684\u3002<\/p>\n<p>\u4f46\u6b63\u7576\u6211\u6c89\u6d78\u5728\u300c\u73fe\u4ee3\u96f2\u539f\u751f\u67b6\u69cb\u771f\u9999\u300d\u7684\u559c\u6085\u4e2d\u6642\uff0c\u6211\u5011\u8eab\u908a\u90a3\u4f4d\u51b7\u9762\u5be9\u67e5\u54e1 Codex \u8d70\u4e86\u904e\u4f86\uff0c\u62ff\u8457\u4e00\u4efd\u8cc7\u5b89\u5831\u544a\uff0c\u51b7\u51b7\u5730\u7d66\u4e86\u6211\u4e00\u8a18\u91cd\u64ca\uff1a<\/p>\n<p>\u300c\u4f60\u77e5\u9053\u4f60\u525b\u525b\u5beb\u7684 Ngram \u5207\u8a5e\u51fd\u5f0f\uff0c\u53ea\u8981\u6709\u4eba\u60e1\u610f\u704c\u5165\u4e00\u7bc7\u9577\u6587\u7ae0\uff0c\u4f60\u7684 Firestore \u7d22\u5f15\u5c31\u6703\u76f4\u63a5\u88ab\u585e\u7206\u3001\u751a\u81f3\u7522\u751f\u8fd1\u842c\u5143\u7684\u5e33\u55ae\u6838\u5f48\u55ce\uff1f\u4f60\u77e5\u9053\u4f60\u7684 Firestore \u898f\u5247\u9580\u6236\u5927\u958b\uff0c\u4efb\u4f55\u767b\u5165\u8005\u90fd\u80fd\u7528 Python \u8173\u672c\u7ac4\u6539\u5168\u7ad9\u6295\u7968\u55ce\uff1f\u300d<\/p>\n<p>\u662f\u7684\uff0c\u5728\u6211\u5011\u501f\u52a9 AI \u6975\u9650\u624b\u901f\u72c2\u98c6\u958b\u767c\uff08Vibe Coding\uff09\u7684\u904e\u7a0b\u4e2d\uff0c\u6211\u5011\u57cb\u4e0b\u4e86\u4e00\u5806\u5dee\u9ede\u8b93\u6574\u500b\u5c08\u6848\u7834\u7522\u7684\u81f4\u547d\u5730\u96f7\u3002<\/p>\n<p>\u5728\u6700\u5f8c\u7684\u7d42\u5c40\u7b2c\u4e03\u7bc7\u88e1\uff0c\u6211\u5011\u5c31\u7531\u5be9\u67e5\u54e1 Codex \u89aa\u81ea\u64cd\u5200\uff0c\u5e36\u5927\u5bb6\u6df1\u5165\u9019\u8d9f Vibe Coding \u65c5\u7a0b\u4e2d\u6700\u9a5a\u5fc3\u52d5\u9b44\u7684\u7ffb\u8eca\u73fe\u5834\uff0c\u958b\u7bb1\u6211\u5011\u5982\u4f55\u7528\u8b77\u6b04\u8a13\u670d AI\uff0c\u4e26\u628a\u9019\u6b3e App \u7684\u8cc7\u5b89\u9632\u79a6\u6253\u78e8\u5230 OWASP MASVS 100 \u5206\u6eff\u5206\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u4e00\u7bc7\u804a\u5230\u6211\u5011\u5728 modern-android \u5206\u652f\u4e0a\u82b1\u4e86\u5e7e\u9031\u6642\u9593\uff0c\u8010\u8457\u6027\u5b50\u628a\u5341\u5e74\u524d\u7684 6 \u9801\u6559\u5b78\u3001\u81ea\u8a02\u5206\u4eab\u8207 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1312,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86,169],"tags":[6,172,179,128],"_links":{"self":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1313"}],"collection":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1313"}],"version-history":[{"count":1,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1313\/revisions"}],"predecessor-version":[{"id":1316,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1313\/revisions\/1316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/media\/1312"}],"wp:attachment":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}