{"id":12865,"date":"2013-05-17T22:00:39","date_gmt":"2013-05-17T19:00:39","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=12865"},"modified":"2013-05-21T10:20:47","modified_gmt":"2013-05-21T07:20:47","slug":"spring-data-solr-tutorial-introduction-to-solr","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html","title":{"rendered":"Spring Data Solr Tutorial: Introduction to Solr"},"content":{"rendered":"<p>Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill the performance of our application by causing heavy load to the database. That is why transferring that load to an external search server is a great idea.<\/p>\n<p>This is the first part of my Spring Data Solr tutorial. During this tutorial we will implement a search function to a todo application which is the example application of my <a href=\"http:\/\/www.petrikainulainen.net\/spring-mvc-test-tutorial\/\">Spring MVC Test tutorial<\/a>.<\/p>\n<p>The requirements of our search function are simple. It must return a list of todo entries which title or description contains the used search term. The search result<br \/>\n&nbsp;<br \/>\npage must also provide a link to the page used to view the information of a todo entry.<\/p>\n<p>Before we can start the implementation of our search function, we need to take a look at the Solr search server. This blog entry provides us the basic information about Solr and it is divided into three parts:<\/p>\n<ul>\n<li>The first part gives us a brief introduction to Solr and its data model.<\/li>\n<li>The second part describes how we can create a schema for our Solr instance.<\/li>\n<li>The last part describes how we can use the REST-like HTTP API provided by Solr.<\/li>\n<\/ul>\n<p>Let\u2019s get started.<\/p>\n<h2>A Brief Introduction to Solr<\/h2>\n<p>Let\u2019s start by getting a brief introduction to the Solr search server. This introduction is very thin and it provides only the information we need to know in order to understand the implementation of our search function.<\/p>\n<p>Also, even though <a href=\"http:\/\/lucene.apache.org\/solr\/\" target=\"_blank\">Solr<\/a> is heavily dependent from <a href=\"http:\/\/lucene.apache.org\/core\/\" target=\"_blank\">Lucene<\/a>, this blog entry makes no difference between them.<\/p>\n<p>This section describes<\/p>\n<ul>\n<li>The data model of Solr search server.<\/li>\n<li>What happens when new documents are added to Solr.<\/li>\n<li>What happens when a search query is executed against the indexed data.<\/li>\n<\/ul>\n<h3>The Data Model<\/h3>\n<p>An <em>index<\/em> consists of <em>documents<\/em> which are essentially a collection of <em>fields<\/em>. If we compare this data model to the data model of a relational database, we notice the following similarities:<\/p>\n<ul>\n<li>An <em>index<\/em> is roughly the same than a database table.<\/li>\n<li>A <em>document<\/em> is similar than a row of a database table.<\/li>\n<li>A <em>field<\/em> means the same than a column of a database table.<\/li>\n<\/ul>\n<p>Each field of a document can be either <em>indexed<\/em>, <em>stored<\/em> or both. The meaning of these terms is described in the following:<\/p>\n<ul>\n<li>An <em>indexed<\/em> field is a field which is searchable and sortable. Indexed fields are not returned in the search results.<\/li>\n<li>A <em>stored<\/em> field is field which value returned in the search results.<\/li>\n<li>If a field is both <em>indexed<\/em> and <em>stored<\/em>, the field is both searchable and sortable. Its value is also returned in the search results.<\/li>\n<\/ul>\n<h3>Adding Information to the Index<\/h3>\n<p>When a new document is added to Solr, indexed and stored fields are processed in a different way. This difference is described in the following:<\/p>\n<ul>\n<li>Indexed fields undergo an analysis phase which typically breaks the text into words and apply different transformations to it. The results of this analysis phase are saved to Solr index.<\/li>\n<li>The values of stored fields are saved as is.<\/li>\n<\/ul>\n<h3>Searching Information from the Index<\/h3>\n<p>The search function can be divided into three steps which are described in the following:<\/p>\n<ul>\n<li>Typically the search query undergo a similar analysis phase than the indexed fields. The goal of this is to ensure that the search query matches with the content of the index.<\/li>\n<li>Solr uses its index to perform the search.<\/li>\n<li>The matching documents are returned in the requested format. Each document contains the values of its stored fields.<\/li>\n<\/ul>\n<h2>Creating the Schema<\/h2>\n<p>The schema is used to configure the following things:<\/p>\n<ul>\n<li>The fields of a document.<\/li>\n<li>How the fields of document are processed when a new document is added to the index.<\/li>\n<li>How the fields are dealt with when a search is executed against the index.<\/li>\n<\/ul>\n<p>The schema is configured in a file called <em>schema.xml<\/em>, and we can create a schema for our application by following these steps:<\/p>\n<ol>\n<li>Configure the used field types.<\/li>\n<li>Configure the fields of our document.<\/li>\n<li>Configure the copy fields.<\/li>\n<li>Configure the unique key field of our document.<\/li>\n<\/ol>\n<p>These steps are described with more details in the following subsections. The skeleton schema of our Solr instance looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&gt;\r\n&lt;schema name=\"todo\" version=\"1.5\"&gt;\r\n    &lt;fields&gt;\r\n        &lt;!-- Configure fields here --&gt;\r\n    &lt;\/fields&gt;\r\n\r\n    &lt;!-- Configure unique key --&gt;\r\n    &lt;!-- Configure copy fields here --&gt;\r\n   \r\n    &lt;types&gt;\r\n        &lt;!-- Configure field types here --&gt;\r\n    &lt;\/types&gt;\r\n&lt;\/schema&gt;<\/pre>\n<p><strong>Note<\/strong>: This section describes the schema of the example application of my blog entry called <a href=\"http:\/\/www.petrikainulainen.net\/programming\/maven\/running-solr-with-maven\/\">Running Solr with Maven<\/a>.<\/p>\n<h3>Configuring the Field Types<\/h3>\n<p>A field type specifies the following things:<\/p>\n<ul>\n<li>The data type of the field.<\/li>\n<li>How the information is analyzed when it is added to the index.<\/li>\n<li>How the information is processed when information is searched from the index.<\/li>\n<\/ul>\n<p>We can configure a field type by using the <em>fieldType<\/em> element. Its attributes which are used in our schema are described in the following:<\/p>\n<ul>\n<li>The <em>name<\/em> attribute states the name of the field type. It is basically an alias which is used declare the type of a field.<\/li>\n<li>The <em>class<\/em> attribute declares the class that implements the field type in question.<\/li>\n<li>The <em>sortMissingLast<\/em> attribute specifies how the sorting works when the value of this field is missing. If the value of this attribute is set to \u2018true\u2019, the documents which don\u2019t have value in the field in question are returned last.<\/li>\n<li>The <em>positionIncrementGap<\/em> attribute declares the amount of empty space which is put between multiple fields of the same document. The value of this attribute is used in multivalued fields and its idea is to prevent false matches across different fields.<\/li>\n<li>The <em>precisionStep<\/em> attribute is used in ranged queries of numeric fields. We can get more information about this by reading the <a href=\"http:\/\/lucene.apache.org\/core\/4_1_0\/core\/org\/apache\/lucene\/search\/NumericRangeQuery.html\" target=\"_blank\">API documentation of the NumericRangeQuery class<\/a>.<\/li>\n<\/ul>\n<p>We can configure the field types of our schema by following these steps:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<ol>\n<li>Configure the Field Type for Long Fields<\/li>\n<li>Configure the Field Type for String Fields<\/li>\n<li>Configure the Field Type for Fields Containing Text<\/li>\n<\/ol>\n<p>These steps are described with more details in the following.<\/p>\n<h2>Configuring the Field Type for Long Fields<\/h2>\n<p>Let\u2019s start by configuring a simple field type for long fields which are not analyzed on the index or search phase. We can configure this field type by following these steps:<\/p>\n<ol>\n<li>Set the <em>name<\/em> of the field type to \u2018long\u2019.<\/li>\n<li>Set the name of the implementing <em>class<\/em> to \u2018solr.TrieLongField\u2019.<\/li>\n<li>Set the value of the <em>precisionStep<\/em> attribute to zero.<\/li>\n<li>Set the value of the <em>positionIncrementGap<\/em> attribute to zero.<\/li>\n<\/ol>\n<p>Our field type declaration looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;fieldType name=\"long\" class=\"solr.TrieLongField\" precisionStep=\"0\" positionIncrementGap=\"0\"\/&gt;<\/pre>\n<h2>Configuring the Field Type for String Fields<\/h2>\n<p>The next step is to configure a simple field type for string fields which are not analyzed on the index or search phase. We can configure this field type by following these steps:<\/p>\n<ol>\n<li>Set the <em>name<\/em> of the field type to \u2018string\u2019.<\/li>\n<li>Set the name of the implementing <em>class<\/em> to \u2018solr.StrField\u2019.<\/li>\n<li>Set the value of the <em>sortMissingLast<\/em> attribute to \u2018true\u2019.<\/li>\n<\/ol>\n<p>The declaration of our string field looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;fieldType name=\"string\" class=\"solr.StrField\" sortMissingLast=\"true\" \/&gt;<\/pre>\n<h2>Configuring the Field Type for Fields Containing Text<\/h2>\n<p>The last step is to configure the <em>text_general<\/em> field type. We can do this by following these steps:<\/p>\n<ol>\n<li>Create a new field type. Set the <em>name<\/em> of the field type to \u2018text_general\u2019. Set the name of the implementing <em>class<\/em> to \u2018solr.TextField\u2019. Set the value of the <em>positionIncrementGap<\/em> to 100.<\/li>\n<li>Create a new analyzer which is run at the index time. Configure that the text is splitted into words by using the word break rules of <a href=\"http:\/\/unicode.org\/reports\/tr29\/\" target=\"_blank\">the Unicode Text Segmentation algorithm<\/a>. Create a filter which removes words found from <em>stopwords.txt<\/em> file from the text. Transform text to lower case.<\/li>\n<li>Create a new analyzer which is run at the query phase. Configure that the search query is splitted into words by using the word break rules of <a href=\"http:\/\/unicode.org\/reports\/tr29\/\" target=\"_blank\">the Unicode Text Segmentation algorithm<\/a>. Create a filter which removes words found from <em>stopwords.txt<\/em> file from the search query. Ensure that the synonyms found from <em>synonyms.txt<\/em> are applied. Transform the search query to lower case.<\/li>\n<\/ol>\n<p>The declaration of the <em>text_general<\/em> field type looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;fieldType name=\"text_general\" class=\"solr.TextField\" positionIncrementGap=\"100\"&gt;\r\n    &lt;!-- Configures the analysis done at the index phase --&gt;\r\n    &lt;analyzer type=\"index\"&gt;\r\n        &lt;!-- Uses word break rules of the Unicode Text Segmentation algorith when splitting text into words. --&gt;\r\n        &lt;tokenizer class=\"solr.StandardTokenizerFactory\"\/&gt;\r\n        &lt;!-- Removes words found from stopwords.txt file. This filter is case insensitive. --&gt;\r\n        &lt;filter class=\"solr.StopFilterFactory\" ignoreCase=\"true\" words=\"stopwords.txt\" enablePositionIncrements=\"true\" \/&gt;\r\n        &lt;!-- Transforms text to lower case --&gt;\r\n        &lt;filter class=\"solr.LowerCaseFilterFactory\"\/&gt;\r\n    &lt;\/analyzer&gt;\r\n    &lt;!-- Configures the analysis done at the query time --&gt;\r\n    &lt;analyzer type=\"query\"&gt;\r\n        &lt;!-- Uses word break rules of the Unicode Text Segmentation algorith when splitting text into words. --&gt;\r\n        &lt;tokenizer class=\"solr.StandardTokenizerFactory\"\/&gt;\r\n        &lt;!-- Removes words found from stopwords.txt file. This filter is case insensitive. --&gt;\r\n        &lt;filter class=\"solr.StopFilterFactory\" ignoreCase=\"true\" words=\"stopwords.txt\" enablePositionIncrements=\"true\" \/&gt;\r\n        &lt;!-- Applies synonyms found from the synonyms.txt file. --&gt;\r\n        &lt;filter class=\"solr.SynonymFilterFactory\" synonyms=\"synonyms.txt\" ignoreCase=\"true\" expand=\"true\"\/&gt;\r\n        &lt;!-- Transforms text to lower case --&gt;\r\n        &lt;filter class=\"solr.LowerCaseFilterFactory\"\/&gt;\r\n    &lt;\/analyzer&gt;\r\n&lt;\/fieldType&gt;<\/pre>\n<p>We can get more information about the analysis phase by reading the following documents:<\/p>\n<ul>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/AnalyzersTokenizersTokenFilters\" target=\"_blank\">Analyzers, Tokenizers and Token Filters<\/a>.<\/li>\n<\/ul>\n<h3>Configuring the Fields of Our Document<\/h3>\n<p>We can add new fields to our document by adding <em>field<\/em> elements to the <em>schema.xml<\/em> file. <a href=\"http:\/\/wiki.apache.org\/solr\/SchemaXml#Common_field_options\" target=\"_blank\">The <em>field<\/em> element has many attributes<\/a> but at this point we need to understand the meaning of following attributes:<\/p>\n<ul>\n<li>The <em>name<\/em> attribute specifies the name of the field.<\/li>\n<li>The <em>indexed<\/em> attribute (true\/false) specifies if the field is added to the search index. Only indexed fields are searchable and sortable.<\/li>\n<li>The <em>stored<\/em> attribute(true\/false) specifies if the field should be returned in the search results.<\/li>\n<li>The <em>multiValued<\/em> (true\/false) specifies if the field can appear in the document more than once.<\/li>\n<li>The <em>type<\/em> type attribute specifies the type of the field.<\/li>\n<li>The <em>required<\/em> (true\/false) specifies whether the field is required or not.<\/li>\n<\/ul>\n<p>In order to make maximize the performance of our Solr instance, we must follow the following guidelines:<\/p>\n<ul>\n<li>We should not store fields which are not required in the search results.<\/li>\n<li>We should not index the fields which are not used by our search function.<\/li>\n<\/ul>\n<p>We can get more information about the optimal field configuration by reading the following documents:<\/p>\n<ul>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/FieldOptionsByUseCase\" target=\"_blank\">Field Options by Use Case<\/a><\/li>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/SolrPerformanceFactors\" target=\"_blank\">Solr Performance Factors<\/a><\/li>\n<\/ul>\n<p>We are now ready to configure the actual fields of our schema. Let\u2019s first talk a bit about the information which we need show on the search result page. This information is described in the following:<\/p>\n<ul>\n<li>We need the id of the todo entry which is used to create a link to the view todo entry page.<\/li>\n<li>We need the title of the todo entry which is used as an anchor text of the created link.<\/li>\n<\/ul>\n<p>When we know that our application must be able to search the contents of the title and description of a todo entry, we can add the required fields to our schema by following these steps:<\/p>\n<ol>\n<li>Add a required field called \u2018id\u2019 to the schema and set its type to \u2018string\u2019. Ensure that this field is both indexed and stored. Set the value of the <em>multiValued<\/em> attribute to false.<\/li>\n<li>Add a required field called \u2018title\u2019 to the schema and its type to \u2018text_general\u2019. Configure this field to be both indexed and stored. Set the value of the <em>multivalued<\/em> attribute to false.<\/li>\n<li>Add a field called \u2018description\u2019 the schema sets its type to \u2018text_general\u2019. Configure this field to be indexed but not stored. Set the value of the <em>multiValued<\/em> attribute to false.<\/li>\n<li>Add a field called \u2018text\u2019 and set its type \u2018text_general\u2019. Configure this field to be indexed but not stored. Set the value of its <em>multiValue<\/em> attribute to true. This field is a field which stores the content of all other indexed text fields.<\/li>\n<li>Add a field called \u2018_version_\u2019 and sets its type \u2018long\u2019. Configure this field to be indexed and stored.<\/li>\n<\/ol>\n<p>Our field declarations looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;field name=\"id\" type=\"string\" indexed=\"true\" stored=\"true\" required=\"true\" multiValued=\"false\" \/&gt;\r\n&lt;field name=\"title\" type=\"text_general\" indexed=\"true\" stored=\"true\" required=\u201ctrue\u201d multiValued=\"false\"\/&gt;\r\n&lt;field name=\"description\" type=\"text_general\" indexed=\"true\" stored=\"false\" multiValued=\"false\"\/&gt;\r\n&lt;field name=\"text\" type=\"text_general\" indexed=\"true\" stored=\"false\" multiValued=\"true\"\/&gt;\r\n&lt;field name=\"_version_\" type=\"long\" indexed=\"true\" stored=\"true\"\/&gt;<\/pre>\n<h3>Configuring the Copy Fields<\/h3>\n<p>We use <a href=\"http:\/\/wiki.apache.org\/solr\/SchemaXml#Copy_Fields\" target=\"_blank\">copy fields<\/a> to copy the contents of <em>title<\/em> and <em>description<\/em> fields to the <em>text<\/em> field. We can configure the copy fields by using the <em>copyField<\/em> element. We can create the required configuration by following these steps:<\/p>\n<ol>\n<li>Create a copy field which copies the value of the \u2018title\u2019 field to the \u2018text\u2019 field.<\/li>\n<li>Create a copy field which copies the value of the \u2018description\u2019 field to the \u2018text\u2019 field.<\/li>\n<\/ol>\n<p>The declaration of our copy fields looks as follows:<\/p>\n<pre class=\"brush:xml\">&lt;copyField source=\"title\" dest=\"text\"\/&gt;\r\n&lt;copyField source=\"description\" dest=\"text\"\/&gt;<\/pre>\n<h3>Configuring the Unique Key Field of Our Document<\/h3>\n<p>The <a href=\"http:\/\/wiki.apache.org\/solr\/SchemaXml#The_Unique_Key_Field\" target=\"_blank\">unique key<\/a> is a field which should be unique for all documents. It is not mandatory to specify the unique key of a document but if we decide to do so, it means that the index cannot contain two documents which both have same value in the field configured as the unique key.<\/p>\n<p>In our case, we use the field \u2018id\u2019 as the unique key of our document. We can make this configuration by adding the following XML to the <em>schema.xml<\/em> file:<\/p>\n<pre class=\"brush:xml\">&lt;uniqueKey&gt;id&lt;\/uniqueKey&gt;<\/pre>\n<h2>Using the REST-like HTTP API<\/h2>\n<p>Solr offers a REST-like HTTP API which we can use to add information to Solr and execute search queries against its index. Both of these use cases are described in the following.<\/p>\n<p><strong>Note<\/strong>: This section assumes that we are using the example application of my blog entry called <a href=\"http:\/\/www.petrikainulainen.net\/programming\/maven\/running-solr-with-maven\/\">Running Solr with Maven<\/a>.<\/p>\n<h3>Adding Information to Solr<\/h3>\n<p>We can add new information to Solr by following these steps:<\/p>\n<ol>\n<li>Send a POST request to the url \u2018http:\/\/localhost:8983\/solr\/update\/json?commit=true\u2019.<\/li>\n<li>Set content type of the request to \u2018application\/json\u2019.<\/li>\n<li>Sending the added information in the body of the request as JSON.<\/li>\n<\/ol>\n<p>The contents of our request body looks as follows:<\/p>\n<pre class=\"brush:java\">[\r\n    {\r\n        \"id\":\"1\",\r\n        \"title\":\"Write introduction to Solr\",\r\n        \"description\":\"This blog entry provides an introduction to Solr search server\"\r\n    },\r\n    {\r\n        \"id\":\"2\",\r\n        \"title\":\"Implement example application\",\r\n        \"description\":\"This application demonstrates the usage of spring-data-solr.\"\r\n    }\r\n]<\/pre>\n<p>We have now added two documents to our Solr index by using the REST-like API provided by Solr.<\/p>\n<p>However, it is good to know that there are other options which we can use to add information to the Solr index. These options are described in the following documents:<\/p>\n<ul>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/UpdateJSON\" target=\"_blank\">POST JSON documents<\/a><\/li>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/DataImportHandler\" target=\"_blank\">Import records from a database<\/a><\/li>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/UpdateCSV\" target=\"_blank\">Load data from a CSV file<\/a><\/li>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/ExtractingRequestHandler\" target=\"_blank\">Index binary documents<\/a><\/li>\n<li><a href=\"http:\/\/wiki.apache.org\/solr\/Solrj\" target=\"_blank\">Use SolrJ<\/a><\/li>\n<\/ul>\n<h3>Searching Information from Solr Index<\/h3>\n<p>We are now ready to search the information stored in the index of our Solr instance. We can execute search queries against the Solr index by following these guidelines:<\/p>\n<ul>\n<li>The search query is executed by sending a GET request to the url \u2018http:\/\/localhost:8983\/solr\/todo\/select\u2019.<\/li>\n<li>The query string must be set as the value of the <a href=\"http:\/\/wiki.apache.org\/solr\/CommonQueryParameters#q\" target=\"_blank\"><em>q<\/em> request parameter<\/a>.<\/li>\n<li>The format of the query results must be set as the value of the <a href=\"http:\/\/wiki.apache.org\/solr\/CoreQueryParameters#wt\" target=\"_blank\"><em>wt<\/em> request parameter<\/a>.<\/li>\n<\/ul>\n<p>Let\u2019s move on and find out how we can list all documents found from the index and execute a simple search query against the indexed data.<\/p>\n<h2>Finding All Documents of the Index<\/h2>\n<p>We can list all documents in JSON format by following these steps:<\/p>\n<ol>\n<li>Send a GET request to the url \u2018http:\/\/localhost:8983\/solr\/todo\/select\u2019.<\/li>\n<li>Set the value of <em>q<\/em> request parameter to \u2018*.*\u2019<\/li>\n<li>Set the value of the <em>wt<\/em> request parameter to \u2018json\u2019.<\/li>\n<\/ol>\n<p>When we send a GET request to the url \u2018http:\/\/localhost:8983\/solr\/todo\/select?q=*%3A*&amp;wt=json\u2019, we should receive the following JSON:<\/p>\n<pre class=\"brush:java\">{\r\n    \"responseHeader\": {\r\n                        \"status\":0,\r\n                        \"QTime\":1,\r\n                        \"params\":{\r\n                                    \"wt\":\"json\",\r\n                                    \"q\":\"*:*\"\r\n                        }\r\n    },\r\n    \"response\":{\r\n                \"numFound\":2,\r\n                \"start\":0,\r\n                \"docs\":[\r\n                        {\r\n                            \"id\":\"1\",\r\n                            \"title\":\"Write introduction to Solr\",\r\n                            \"_version_\":1425949176574771200\r\n                        },\r\n                        {\r\n                            \"id\":\"2\",\r\n                            \"title\":\"Implement example application\",\r\n                            \"_version_\":1425949176662851584\r\n                        }\r\n                ]\r\n    }\r\n}<\/pre>\n<h2>Searching Information from the Index<\/h2>\n<p>We can search all documents which title or description contains the word \u2018application\u2019 by following these steps:<\/p>\n<ol>\n<li>Send a GET request to the url \u2018http:\/\/localhost:8983\/solr\/todo\/select\u2019.<\/li>\n<li>Set the value of <em>q<\/em> request parameter to \u2018application\u2019<\/li>\n<li>Set the value of the <em>wt<\/em> request parameter to \u2018json\u2019.<\/li>\n<\/ol>\n<p>When we send a GET request tot he url \u2018http:\/\/localhost:8983\/solr\/todo\/select?q=application&amp;wt=json\u2019, we should receive the following JSON:<\/p>\n<pre class=\"brush:java\">{\r\n    \"responseHeader\":{\r\n                        \"status\":0,\r\n                        \"QTime\":7,\r\n                        \"params\":{\r\n                                    \"wt\":\"json\",\r\n                                    \"q\":\"application\"\r\n                        }\r\n    },\r\n    \"response\":{\r\n                \"numFound\":1,\r\n                \"start\":0,\r\n                \"docs\":[\r\n                        {\r\n                            \"id\":\"2\",\r\n                            \"title\":\"Implement example application\",\r\n                            \"_version_\":1425949176662851584\r\n                        }\r\n                ]\r\n    }\r\n}<\/pre>\n<h2>The End<\/h2>\n<p>We have now obtained the information which is required to understand the concepts described in the next parts of my Spring Data Solr tutorial. This blog entry has teached us three things:<\/p>\n<ul>\n<li>We know the basics of the Solr data model.<\/li>\n<li>We know how we can configure the schema of our Solr instance.<\/li>\n<li>We know how we can add documents to the Solr index and search information from it by using the HTTP API of Solr.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/www.petrikainulainen.net\/programming\/solr\/spring-data-solr-tutorial-introduction-to-solr\/\">Spring Data Solr Tutorial: Introduction to Solr<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Petri Kainulainen at the <a href=\"http:\/\/www.petrikainulainen.net\/\">Petri Kainulainen<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill the performance of our application by causing heavy load to the database. That is why transferring that load to an external search server is a great idea. &hellip;<\/p>\n","protected":false},"author":429,"featured_media":80,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[470,30,321],"class_list":["post-12865","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-solr","tag-spring","tag-spring-data"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Data Solr Tutorial: Introduction to Solr - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Data Solr Tutorial: Introduction to Solr - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-17T19:00:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-05-21T07:20:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Petri Kainulainen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/petrikainulaine\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Petri Kainulainen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html\"},\"author\":{\"name\":\"Petri Kainulainen\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5af4df3fdfeb79e9fa3598d79bff2c9e\"},\"headline\":\"Spring Data Solr Tutorial: Introduction to Solr\",\"datePublished\":\"2013-05-17T19:00:39+00:00\",\"dateModified\":\"2013-05-21T07:20:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html\"},\"wordCount\":2550,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"keywords\":[\"Apache Solr\",\"Spring\",\"Spring Data\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html\",\"name\":\"Spring Data Solr Tutorial: Introduction to Solr - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"datePublished\":\"2013-05-17T19:00:39+00:00\",\"dateModified\":\"2013-05-21T07:20:47+00:00\",\"description\":\"Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-solr-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/05\\\/spring-data-solr-tutorial-introduction-to-solr.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Data Solr Tutorial: Introduction to Solr\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5af4df3fdfeb79e9fa3598d79bff2c9e\",\"name\":\"Petri Kainulainen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g\",\"caption\":\"Petri Kainulainen\"},\"description\":\"Petri is passionate about software development and continuous improvement. He is specialized in software development with the Spring Framework and is the author of Spring Data book.\",\"sameAs\":[\"http:\\\/\\\/www.petrikainulainen.net\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/in\\\/petrikainulainen\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/petrikainulaine\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/petri-kainulainen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Data Solr Tutorial: Introduction to Solr - Java Code Geeks","description":"Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html","og_locale":"en_US","og_type":"article","og_title":"Spring Data Solr Tutorial: Introduction to Solr - Java Code Geeks","og_description":"Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill","og_url":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-05-17T19:00:39+00:00","article_modified_time":"2013-05-21T07:20:47+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","type":"image\/jpeg"}],"author":"Petri Kainulainen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/petrikainulaine","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Petri Kainulainen","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html"},"author":{"name":"Petri Kainulainen","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5af4df3fdfeb79e9fa3598d79bff2c9e"},"headline":"Spring Data Solr Tutorial: Introduction to Solr","datePublished":"2013-05-17T19:00:39+00:00","dateModified":"2013-05-21T07:20:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html"},"wordCount":2550,"commentCount":5,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","keywords":["Apache Solr","Spring","Spring Data"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html","url":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html","name":"Spring Data Solr Tutorial: Introduction to Solr - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","datePublished":"2013-05-17T19:00:39+00:00","dateModified":"2013-05-21T07:20:47+00:00","description":"Most of the applications must have a some kind of a search function. The problem is that search functions are often huge resource hogs and they can kill","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-solr-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/05\/spring-data-solr-tutorial-introduction-to-solr.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Data Solr Tutorial: Introduction to Solr"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5af4df3fdfeb79e9fa3598d79bff2c9e","name":"Petri Kainulainen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9e57425180f323fa65bc519a64c8273d3fcb7c6bd272e56b37dd15613f403659?s=96&d=mm&r=g","caption":"Petri Kainulainen"},"description":"Petri is passionate about software development and continuous improvement. He is specialized in software development with the Spring Framework and is the author of Spring Data book.","sameAs":["http:\/\/www.petrikainulainen.net\/","http:\/\/www.linkedin.com\/in\/petrikainulainen","https:\/\/x.com\/https:\/\/twitter.com\/petrikainulaine"],"url":"https:\/\/www.javacodegeeks.com\/author\/petri-kainulainen"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/12865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/429"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=12865"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/12865\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/80"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=12865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=12865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=12865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}