{"id":3565,"date":"2018-12-14T14:46:24","date_gmt":"2018-12-14T06:46:24","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=3565"},"modified":"2018-12-14T14:46:24","modified_gmt":"2018-12-14T06:46:24","slug":"lucene-%e5%ae%9e%e6%88%98%e6%95%99%e7%a8%8b%e7%ac%ac%e5%8d%81%e5%85%ad%e7%ab%a0-springboot-%e6%95%b4%e5%90%88-lucene","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=3565","title":{"rendered":"Lucene \u5b9e\u6218\u6559\u7a0b\u7b2c\u5341\u516d\u7ae0 SpringBoot \u6574\u5408 Lucene"},"content":{"rendered":"<p>\n\t\u7f51\u4e0a\u641c\u7d22\u4e86\u4e00\u4e0b\u5173\u4e8e Lucene \u6559\u7a0b\u7684\u6587\u7ae0\u975e\u5e38\u591a\uff0c\u4f46\u662f\u5173\u4e8e SpringBoot \u6574\u5408 Lucene \u7684\u975e\u5e38\u5c11\uff0c\u53ef\u80fd\u4e00\u4e9b\u6d89\u53ca\u5230\u641c\u7d22\u7684\u9879\u76ee\u90fd\u6bd4\u8f83\u8001\uff0c\u4f7f\u7528 Lucene \u7684\u6bd4\u8f83\u5c11\uff0c\u4f7f\u7528 Solr \u548c Elasticsearch \u7684\u53ef\u80fd\u6bd4\u8f83\u591a\u3002\u4f46\u662f\u6587\u7ae0\u5c11\uff0c\u5e76\u4e0d\u4ee3\u8868\u6ca1\u6709\u4eba\u7528\uff0c\u6240\u4ee5\u672c\u6587\u6211\u6559\u5927\u5bb6\u5982\u4f55\u628a Lucene \u548c SpringBoot \u6574\u5408\u5230\u4e00\u8d77\u3002\n<\/p>\n<p>\n\t\u81f3\u4e8e\uff0c\u4f60\u4eec\u8fd8\u4e0d\u61c2 Lucene \u662f\u4ec0\u4e48\u7684\uff0c\u5efa\u8bae\u770b\u6211\u524d\u9762\u7684\u6587\u7ae0\u3002\u6709\u8be6\u7ec6\u7684\u6559\u7a0b\u3002\n<\/p>\n<p>\n\tSpringBoot \u4e0d\u8bba\u6574\u5408\u4ec0\u4e48\u6846\u67b6\uff0c\u90fd\u662f\u5148\u4ece pom.xml \u6587\u4ef6\u5f00\u59cb\u3002\u540c\u6837\u7684\u6574\u5408 Lucene \u4e5f\u9700\u8981\u5f15\u5165 Lucene \u76f8\u5173\u7684 jar \u6587\u4ef6\u3002\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;!--\u5bf9\u5206\u8bcd\u7d22\u5f15\u67e5\u8be2\u89e3\u6790--&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.apache.lucene&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;lucene-queryparser&lt;\/artifactId&gt;\r\n\t&lt;version&gt;7.1.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;!--\u9ad8\u4eae --&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.apache.lucene&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;lucene-highlighter&lt;\/artifactId&gt;\r\n\t&lt;version&gt;7.1.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;!--smartcn \u4e2d\u6587\u5206\u8bcd\u5668 SmartChineseAnalyzer  smartcn\u5206\u8bcd\u5668 \u9700\u8981lucene\u4f9d\u8d56 \u4e14\u548clucene\u7248\u672c\u540c\u6b65--&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.apache.lucene&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;lucene-analyzers-smartcn&lt;\/artifactId&gt;\r\n\t&lt;version&gt;7.1.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;!--ik-analyzer \u4e2d\u6587\u5206\u8bcd\u5668--&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;cn.bestwu&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;ik-analyzers&lt;\/artifactId&gt;\r\n\t&lt;version&gt;5.1.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;!--MMSeg4j \u5206\u8bcd\u5668--&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;com.chenlb.mmseg4j&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;mmseg4j-solr&lt;\/artifactId&gt;\r\n\t&lt;version&gt;2.4.0&lt;\/version&gt;\r\n\t&lt;exclusions&gt;\r\n\t\t&lt;exclusion&gt;\r\n\t\t\t&lt;groupId&gt;org.apache.solr&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;solr-core&lt;\/artifactId&gt;\r\n\t\t&lt;\/exclusion&gt;\r\n\t&lt;\/exclusions&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<p>\n\tLucene \u76ee\u524d\u8fd8\u6ca1\u6709\u63d0\u4f9b SpringBoot \u65b9\u9762\u7684\u81ea\u52a8\u914d\u7f6e\u7684 starter\uff0c\u6240\u4ee5\u5f15\u5165\u7684 jar \u6587\u4ef6\u53ef\u80fd\u8f83\u591a\u3002\n<\/p>\n<p>\n\t\u5b9e\u4f8b\u5316 IndexReader \u9700\u8981\u52a0\u8f7d\u7d22\u5f15\u6587\u4ef6\uff0c\u6240\u4ee5\u5b9e\u4f8b\u5316\u5b83\u662f\u975e\u5e38\u8017\u8d44\u6e90\u7684\u3002&nbsp;\n<\/p>\n<p>\n\tIndexReader \u662f\u7ebf\u7a0b\u5b89\u5168\u7684\uff0c\u901a\u5e38\u4e00\u4e2a\u7d22\u5f15\u76ee\u5f55\uff0c\u6211\u4eec\u53ea\u5b9e\u4f8b\u5316\u4e00\u4e2a IndexReader \u5c31\u591f\u4e86\u3002&nbsp;\n<\/p>\n<pre class=\"brush:java;\">\r\n@Configuration\r\npublic class LuceneConfig {\r\n\r\n\t\/\/ \u521b\u5efa\u4e00\u4e2a Analyzer \u5b9e\u4f8b\r\n\t@Bean\r\n    public Analyzer analyzer() {\r\n        return new IKAnalyzer(false);\r\n    }\r\n\r\n    \/\/ \u7d22\u5f15\u4f4d\u7f6e\r\n    @Bean\r\n    public Directory directory() {\r\n        return FSDirectory.open(Paths.get(&quot;indexDir\/&quot;));\r\n    }\r\n\r\n\t\/\/ \u521b\u5efa IndexReader\r\n    @Bean\r\n    public IndexReader indexReader(Directory directory) {\r\n        return DirectoryReader.open(directory);\r\n    }\r\n\r\n    \/\/ \u521b\u5efa SearcherManager\r\n    @Bean\r\n    public SearcherManager searcherManager(Directory directory) throws IOException {\r\n        return new SearcherManager(directory, null);\r\n    }\r\n\r\n    \/\/ \u521b\u5efa IndexSearcher\r\n\t@Bean\r\n    public IndexSearcher indexSearcher(IndexReader indexReader){\r\n    \treturn new IndexSearcher(indexReader);\r\n    }\r\n}<\/pre>\n<p>\n\t\u540c\u6837\u7684 IndexSearcher \u5b9e\u4f8b\u4e00\u4e2a\u4e5f\u5c31\u591f\u4e86\u3002\u5982\u679c\u4e0d\u591f\uff0c\u53ef\u4ee5\u4f7f\u7528 searcherManager \u5b9e\u4f8b\u3002\n<\/p>\n<p>\n\tsearcherManager \u5b9e\u4f8b\u7684\u7528\u6cd5\uff0c\u4e00\u822c\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:java;\">\r\n@Service\r\npublic class XttblogService(){\r\n\t@Autowired\r\n    private SearcherManager searcherManager;\r\n\t\r\n    public Set&lt;Map&lt;String, Object&gt;&gt; search(String keyword, int page) {\r\n        IndexSearcher searcher = null;\r\n\r\n        Set&lt;Map&lt;String, Object&gt;&gt; data = newLinkedHashSetWithExpectedSize(DEFAULT_PAGE_SIZE);\r\n        try {\r\n            searcher = searcherManager.acquire();\r\n\r\n            BooleanQuery query = ......\r\n            ......\r\n        } catch (IOException e) {\r\n            logger.error(&quot;acquire beer searcher failed&quot;);\r\n            logger.error(e.getLocalizedMessage(), e);\r\n        } catch (ParseException e) {\r\n            logger.error(&quot;failed to build query for \\&quot;{}\\&quot;&quot;, keyword);\r\n        } finally {\r\n            if (searcher != null) {\r\n                try {\r\n                    searcherManager.release(searcher);\r\n                } catch (IOException e) {\r\n                    logger.error(&quot;release beer searcher failed&quot;);\r\n                    logger.error(e.getLocalizedMessage(), e);\r\n                }\r\n            }\r\n        }\r\n        return data;\r\n    }\r\n}<\/pre>\n<p>\n\t\u5c01\u88c5\u597d\u4e86\u5404\u4e2a bean \u53ea\u6709\uff0c\u67e5\u8be2\u641c\u7d22\uff0c\u521b\u5efa\u7d22\u5f15\uff0c\u66f4\u65b0\uff0c\u5220\u9664\u7d22\u5f15\u4e4b\u7c7b\u7684\u5c31\u975e\u5e38\u7b80\u5355\u4e86\u3002\n<\/p>\n<p>\n\t\u4e0b\u9762\u770b\u51e0\u4e2a\u8d31\u7684\u67e5\u8be2\u4f8b\u5b50\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\n**\r\n * \u6267\u884c\u67e5\u8be2\uff0c\u5e76\u6253\u5370\u67e5\u8be2\u5230\u7684\u8bb0\u5f55\u6570\r\n * @param query\r\n * @throws IOException\r\n *\/\r\npublic void executeQuery(Query query) throws IOException {\r\n\tTopDocs topDocs = indexSearcher.search(query, 100);\r\n\t\/\/\u6253\u5370\u67e5\u8be2\u5230\u7684\u8bb0\u5f55\u6570\r\n\tSystem.out.println(&quot;\u603b\u5171\u67e5\u8be2\u5230&quot; + topDocs.totalHits + &quot;\u4e2a\u6587\u6863&quot;);\r\n\tfor (ScoreDoc scoreDoc : topDocs.scoreDocs) {\r\n\t\t\/\/\u53d6\u5f97\u5bf9\u5e94\u7684\u6587\u6863\u5bf9\u8c61\r\n\t\tDocument document = indexSearcher.doc(scoreDoc.doc);\r\n\t\tSystem.out.println(&quot;id\uff1a&quot; + document.get(&quot;id&quot;));\r\n\t\tSystem.out.println(&quot;title\uff1a&quot; + document.get(&quot;title&quot;));\r\n\t\tSystem.out.println(&quot;content\uff1a&quot; + document.get(&quot;content&quot;));\r\n\t}\r\n}\r\n\r\n\/**\r\n * \u5206\u8bcd\u6253\u5370\r\n * @param analyzer\r\n * @param text\r\n * @throws IOException\r\n *\/\r\npublic void printAnalyzerDoc(Analyzer analyzer, String text) throws IOException {\r\n\tTokenStream tokenStream = analyzer.tokenStream(&quot;content&quot;, new StringReader(text));\r\n\tCharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\ttry {\r\n\t\ttokenStream.reset();\r\n\t\twhile (tokenStream.incrementToken()) {\r\n\t\t\tSystem.out.println(charTermAttribute.toString());\r\n\t\t}\r\n\t\ttokenStream.end();\r\n\t} finally {\r\n\t\ttokenStream.close();\r\n\t\tanalyzer.close();\r\n\t}\r\n}\r\n\r\npublic void indexWriterBook(Book book) throws IOException {\r\n\tlong start = System.currentTimeMillis();\r\n\r\n\t\/\/ indexWriterConfig \u4e5f\u53ef\u4ee5\u901a\u8fc7\u5f15\u5165\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\r\n\t\/\/\u521b\u5efa\u7d22\u5f15\u5199\u5165\u914d\u7f6e\r\n\tIndexWriterConfig indexWriterConfig = new IndexWriterConfig(analyzer);\r\n\r\n\t\/\/\u521b\u5efa\u7d22\u5f15\u5199\u5165\u5bf9\u8c61\r\n\tIndexWriter indexWriter = new IndexWriter(directory, indexWriterConfig);\r\n\r\n\t\/\/\u521b\u5efaDocument\u5bf9\u8c61\uff0c\u5b58\u50a8\u7d22\u5f15\r\n\r\n\tDocument doc = new Document();\r\n\r\n\tint id = 1;\r\n\r\n\t\/\/\u5c06\u5b57\u6bb5\u52a0\u5165\u5230doc\u4e2d\r\n\tdoc.add(new IntPoint(&quot;id&quot;, book.getId()));\r\n\tdoc.add(new StringField(&quot;title&quot;, book.getTitle(), Field.Store.YES));\r\n\tdoc.add(new TextField(&quot;content&quot;, book.getContent(), Field.Store.YES));\r\n\tdoc.add(new StoredField(&quot;id&quot;, book.getId()));\r\n\r\n\t\/\/\u5c06doc\u5bf9\u8c61\u4fdd\u5b58\u5230\u7d22\u5f15\u5e93\u4e2d\r\n\tindexWriter.addDocument(doc);\r\n\r\n\tindexWriter.commit();\r\n\t\/\/\u5173\u95ed\u6d41\r\n\tindexWriter.close();\r\n\r\n\tlong end = System.currentTimeMillis();\r\n\tSystem.out.println(&quot;\u7d22\u5f15\u82b1\u8d39\u4e86&quot; + (end - start) + &quot; \u6beb\u79d2&quot;);\r\n}\r\n\r\npublic void termQueryTitle(String title) throws IOException {\r\n\tString searchField = &quot;title&quot;;\r\n\t\/\/\u8fd9\u662f\u4e00\u4e2a\u6761\u4ef6\u67e5\u8be2\u7684api\uff0c\u7528\u4e8e\u6dfb\u52a0\u6761\u4ef6\r\n\tTermQuery query = new TermQuery(new Term(searchField, title));\r\n\r\n\t\/\/\u6267\u884c\u67e5\u8be2\uff0c\u5e76\u6253\u5370\u67e5\u8be2\u5230\u7684\u8bb0\u5f55\u6570\r\n\texecuteQuery(query);\r\n}\r\n\r\n@Test\r\npublic void BooleanQueryTest(String t, String t2) throws IOException {\r\n\r\n\tString searchField1 = &quot;title&quot;;\r\n\tString searchField2 = &quot;content&quot;;\r\n\tQuery query1 = new TermQuery(new Term(searchField1, t));\r\n\tQuery query2 = new TermQuery(new Term(searchField2, t2));\r\n\tBooleanQuery.Builder builder = new BooleanQuery.Builder();\r\n\r\n\t\/\/ BooleanClause\u7528\u4e8e\u8868\u793a\u5e03\u5c14\u67e5\u8be2\u5b50\u53e5\u5173\u7cfb\u7684\u7c7b\uff0c\r\n\t\/\/ \u5305 \u62ec\uff1a\r\n\t\/\/ BooleanClause.Occur.MUST\uff0c\r\n\t\/\/ BooleanClause.Occur.MUST_NOT\uff0c\r\n\t\/\/ BooleanClause.Occur.SHOULD\u3002\r\n\t\/\/ \u5fc5\u987b\u5305\u542b,\u4e0d\u80fd\u5305\u542b,\u53ef\u4ee5\u5305\u542b\u4e09\u79cd.\u6709\u4ee5\u4e0b6\u79cd\u7ec4\u5408\uff1a\r\n\t\/\/\r\n\t\/\/ 1\uff0eMUST\u548cMUST\uff1a\u53d6\u5f97\u8fde\u4e2a\u67e5\u8be2\u5b50\u53e5\u7684\u4ea4\u96c6\u3002\r\n\t\/\/ 2\uff0eMUST\u548cMUST_NOT\uff1a\u8868\u793a\u67e5\u8be2\u7ed3\u679c\u4e2d\u4e0d\u80fd\u5305\u542bMUST_NOT\u6240\u5bf9\u5e94\u5f97\u67e5\u8be2\u5b50\u53e5\u7684\u68c0\u7d22\u7ed3\u679c\u3002\r\n\t\/\/ 3\uff0eSHOULD\u4e0eMUST_NOT\uff1a\u8fde\u7528\u65f6\uff0c\u529f\u80fd\u540cMUST\u548cMUST_NOT\u3002\r\n\t\/\/ 4\uff0eSHOULD\u4e0eMUST\u8fde\u7528\u65f6\uff0c\u7ed3\u679c\u4e3aMUST\u5b50\u53e5\u7684\u68c0\u7d22\u7ed3\u679c,\u4f46\u662fSHOULD\u53ef\u5f71\u54cd\u6392\u5e8f\u3002\r\n\t\/\/ 5\uff0eSHOULD\u4e0eSHOULD\uff1a\u8868\u793a&ldquo;\u6216&rdquo;\u5173\u7cfb\uff0c\u6700\u7ec8\u68c0\u7d22\u7ed3\u679c\u4e3a\u6240\u6709\u68c0\u7d22\u5b50\u53e5\u7684\u5e76\u96c6\u3002\r\n\t\/\/ 6\uff0eMUST_NOT\u548cMUST_NOT\uff1a\u65e0\u610f\u4e49\uff0c\u68c0\u7d22\u65e0\u7ed3\u679c\u3002\r\n\r\n\tbuilder.add(query1, BooleanClause.Occur.SHOULD);\r\n\tbuilder.add(query2, BooleanClause.Occur.SHOULD);\r\n\r\n\tBooleanQuery query = builder.build();\r\n\r\n\t\/\/\u6267\u884c\u67e5\u8be2\uff0c\u5e76\u6253\u5370\u67e5\u8be2\u5230\u7684\u8bb0\u5f55\u6570\r\n\texecuteQuery(query);\r\n}<\/pre>\n<p>\n\t\u770b\u5427\uff0c\u6574\u5408 SpringBoot \u4e5f\u662f\u975e\u5e38\u7684\u7b80\u5355\u3002\u5e76\u6ca1\u6709\u5927\u5bb6\u60f3\u8c61\u7684\u90a3\u4e48\u96be\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=3565\">Lucene \u5b9e\u6218\u6559\u7a0b\u7b2c\u5341\u516d\u7ae0 SpringBoot \u6574\u5408 Lucene<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u7f51\u4e0a\u641c\u7d22\u4e86\u4e00\u4e0b\u5173\u4e8e Lucene \u6559\u7a0b\u7684\u6587\u7ae0\u975e\u5e38\u591a\uff0c\u4f46\u662f\u5173\u4e8e SpringBoot \u6574\u5408 Lucene \u7684\u975e\u5e38 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1826,1781,1444,1522,590],"class_list":["post-3565","post","type-post","status-publish","format-standard","hentry","category-java","tag-indexreader","tag-indexsearcher","tag-lucene","tag-springboot","tag-springboottest"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3565"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3565\/revisions"}],"predecessor-version":[{"id":3566,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3565\/revisions\/3566"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}