{"id":1727,"date":"2020-10-02T07:18:17","date_gmt":"2020-10-02T14:18:17","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/"},"modified":"2020-10-02T07:18:17","modified_gmt":"2020-10-02T14:18:17","slug":"full-text-search-tips-for-query-performance","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/","title":{"rendered":"Full-Text Search &#8211; 5 Tips To Improve Your Query Performance"},"content":{"rendered":"\n<p><span>Tuning the search query performance is a very important aspect of <a href=\"https:\/\/docs.couchbase.com\/server\/current\/learn\/services-and-indexes\/services\/search-service.html\">Full-Text Search<\/a> as it helps business-critical applications in meeting the SLA requirements of latency and throughput. Without much preamble, let me share a few useful recommendations for troubleshooting your search performance. All of these suggestions are agnostic of any hardware configurations, cluster topologies, and are applicable to most generic search use cases.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Search As Few Fields As Possible<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>This is particularly applicable to certain types of <a href=\"https:\/\/docs.couchbase.com\/server\/6.6\/fts\/fts-query-types.html#compound-queries\">composite queries<\/a> where the user tries to search a common search query text across multiple indexed fields.<\/span><\/p>\n\n\n\n<p><span>Let us delve into a sample query.<\/span><\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]&#8221;query&#8221;: {<br \/>\n  &#8220;conjuncts&#8221;: [<br \/>\n    {<br \/>\n      &#8220;field&#8221;: &#8220;UserName&#8221;,<br \/>\n      &#8220;match&#8221;: &#8220;searchText&#8221;,<br \/>\n       &#8220;fuzziness&#8221;: 1<\/p>\n<p>    },<br \/>\n    {<br \/>\n      &#8220;field&#8221;: &#8220;Department.Name&#8221;,<br \/>\n      &#8220;match&#8221;: &#8220;searchText&#8221;,<br \/>\n      &#8220;fuzziness&#8221;: 1<br \/>\n    },<br \/>\n    {<br \/>\n      &#8220;field&#8221;: &#8220;SecondName&#8221;,<br \/>\n      &#8220;match&#8221;: &#8220;searchText&#8221;,<br \/>\n      &#8220;fuzziness&#8221;: 1<br \/>\n    },<br \/>\n   {<br \/>\n      &#8220;field&#8221;: &#8220;ConsumerName&#8221;,<br \/>\n      &#8220;match&#8221;: &#8220;searchText&#8221;<br \/>\n       &#8220;fuzziness&#8221;: 1<br \/>\n    }<br \/>\n]}<br \/>\n[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>If we notice &#8211; there are 4 match query clauses in the conjunct composite query all of which have the same search text. This is highly inefficient, as in the background the search system has to graze a lot of data indexed across different fields for the same search text. This overhead is worsened by the multitude of runtime query structures created and garbage collected across fields.<\/span><\/p>\n\n\n\n<p><span>FTS has a feature to support this in a very efficient way. It lets the users index multiple source document fields against a generic configurable field. Once the user does this during the index definition time, then they could execute searches against that single common field.<\/span><\/p>\n\n\n\n<p><span>To avail of this feature, the user needs to <a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-creating-indexes.html#inserting-a-child-field\">enable the <\/a><\/span><b><i>`_all`<\/i><\/b><span> option against all those multiple fields in the field mapping during the indexing.<\/span><\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9382\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/Screenshot-2020-09-27-at-10.40.26-PM-300x98-1.png\" alt=\"Diagram depicting - how to enable the `_all` option in the field mapping\" width=\"563\" height=\"184\"><\/p>\n\n\n\n<p><span>With this, all these field contents will also get indexed against the default <em><strong>_all<\/strong><\/em> field in the index. This has an additional storage aspect for the index size.<\/span><\/p>\n\n\n\n<p><span>Now the user should be able to issue queries without explicitly specifying the target field.\u00a0 And whenever target fields are not specified in the query, Full-Text Search will search it against the default common field <\/span><b><i>`_all`.\u00a0<\/i><\/b><\/p>\n\n\n\n<p><span>So with the above optimization, the earlier query would become a simpler one like below,<\/span><\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]&#8221;query&#8221;: {<br \/>\n\u00a0\u00a0&#8220;conjuncts&#8221;: [<br \/>\n\u00a0\u00a0\u00a0\u00a0{<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;match&#8221;: &#8220;searchText&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u201cfuzziness\u201d : 1,<br \/>\n\u00a0\u00a0\u00a0\u00a0}<br \/>\n]<br \/>\n}[\/crayon]<\/p>\n\n\n\n<p><span>This search query performance ought to be much lighter and faster compared to the original query.<\/span><\/p>\n\n\n\n<p>Note: This is applicable if there is no <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/fts\/query-string-queries.html#boosting\">score boosting<\/a> used in the original query for the child clauses.<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Specify <\/b><b><i>prefix_length<\/i><\/b><b> For Fuzzy Match Queries\u00a0<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>Users choose fuzzy <a href=\"https:\/\/docs.couchbase.com\/server\/6.6\/fts\/fts-query-types.html#match-query\">match queries<\/a> for helping against any potential spelling mistakes within the search texts. With the fuzziness factor, they would still get the intended document hits from the search system. But fuzzy users need to keep in mind that fuzzy queries are extremely resource-consuming queries. <\/span><\/p>\n\n\n\n<p><b>How<\/b><span> &#8211; In a sufficiently large FTS index, there will be many candidate tokens that are at a given fuzziness\/edit distance from the query text. So essentially a single fuzzy query will become a disjunct\/OR query for all the candidate tokens present in the index. This results in a high internal fan out of the rudimentary search operations which is resource cumbersome.<\/span><\/p>\n\n\n\n<p>Let&#8217;s check out a simpler example for the query fan-out here.<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-9386\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/tree-200x300-1.png\" alt=\"word-tree of edit distanced terms for `plan`\" width=\"171\" height=\"257\"><\/p>\n\n\n\n<p>A match fuzzy query with a fuzziness of 1 for the query text &#8220;plan&#8221; would result in total 6 terms getting searched underneath as in this example. (given that only those 5 terms are present in the indexed content which are at the asked edit distance or fuzziness of 1)<\/p>\n\n\n\n<p><span>One important optimization idea while guarding against any potential misspellings is that &#8211; most spelling mistakes happen towards the end, not towards the beginning of the text. Users can leverage this fact and utilize the <\/span><i><span>prefix_length<\/span><\/i><span> option in fuzzy queries. Once the <\/span><i><span>prefix_length<\/span><\/i><span> is given, then the fuzziness will only be considered for the text after the given <\/span><i><span>prefix_length<\/span><\/i><span>.<\/span><\/p>\n\n\n\n<p><span>Usually, a <\/span><i><span>prefix_length<\/span><\/i><span> of 2 or 3 ought to be good. But certainly, this is an application or use case-specific one.<\/span><\/p>\n\n\n\n<p><em><span>Example:<\/span><\/em><\/p>\n\n\n<p>[crayon font-size=&#8221;16&#8243; lang=&#8221;default&#8221; decode=&#8221;true&#8221;]{<br \/>\n\u00a0&#8220;match&#8221;: &#8220;beautiful&#8221;,\u00a0 =&gt; &#8220;autiful&#8221; is only considered for fuzziness<br \/>\n\u00a0&#8220;field&#8221;: &#8220;reviews.content&#8221;,<br \/>\n\u00a0&#8220;analyzer&#8221;: &#8220;standard&#8221;,<br \/>\n\u00a0&#8220;fuzziness&#8221;: 1,<br \/>\n\u00a0&#8220;prefix_length&#8221;: 2<br \/>\n}[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>This drastically reduces the scope\/number of the tokens searched in the index for a given fuzzy query.\u00a0 And the search query performance can be significantly improved by specifying a `<i>prefix_length<\/i>` for the fuzziness.\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Skip Scoring When Text Relevancy Doesn\u2019t Matter<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>Many times it is observed that users are using Full-Text Search for the exact match queries with a bit of fuzziness or other search specific capabilities like <a href=\"https:\/\/www.couchbase.com\/blog\/how-to-geospatial-polygon-search\/\">geo<\/a>. Text relevancy score doesn\u2019t matter when the user is looking for exact or more targeted searches with many predicates.\u00a0<\/span><\/p>\n\n\n\n<p><span>In similar situations where the user isn\u2019t interested in the default <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tf%E2%80%93idf#:~:text=In%20information%20retrieval%2C%20tf%E2%80%93idf,in%20a%20collection%20or%20corpus.\">tf-idf<\/a> scoring, then they could optimize the query performance by skipping the scoring altogether. Users may skip the scoring by passing a &#8220;score&#8221;: &#8220;none&#8221; option in the search request.\u00a0<\/span><\/p>\n\n\n\n<p><i><span>Example:\u00a0<\/span><\/i><\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]{<br \/>\n &#8220;query&#8221;: {},<br \/>\n &#8220;score&#8221;: &#8220;none&#8221;,<br \/>\n &#8220;size&#8221;: 10,<br \/>\n &#8220;from&#8221;: 0<br \/>\n}[\/crayon]<\/p>\n\n\n\n<p><span>This improves the search query performance significantly in many cases, especially for composite queries with many child search clauses.<\/span><\/p>\n\n\n\n<p><span>This feature is available since the Couchbase server release &#8211; 6.6.1<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Keyset Pagination For Deeper Page Searches<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>As you might know, the pagination of search results can be done using the `from` and `size` parameters in the search request. But as the search gets into deeper pages it becomes highly resource taxing.\u00a0 The primary reason being the search results are by default sorted by their <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tf%E2%80%93idf#:~:text=In%20information%20retrieval%2C%20tf%E2%80%93idf,in%20a%20collection%20or%20corpus.\">tf-idf<\/a> scores, and Full-Text Search has heap memory requirements proportional to the requested page\u2019s offset and size. ie `from+size` for maintaining this ranking.\u00a0<\/span><\/p>\n\n\n\n<p><span>To safeguard against any arbitrary higher memory requirements, we have a configurable limit <\/span><b>bleveMaxResultWindow<\/b><span> (10000 default) on the maximum allowable page offsets. But bumping this limit to higher levels isn\u2019t a scalable solution.<\/span><\/p>\n\n\n\n<p><span>To circumvent this problem, we have introduced the concept of key set pagination in FTS.\u00a0<\/span><\/p>\n\n\n\n<p><span>Instead of providing `<\/span><i><span>from`<\/span><\/i><span> as a number of search results to skip, the user will provide the sort value of a previously seen search result (usually, the last result shown on the current page).\u00a0 The idea is that to show the next page of the results, we just want the top N results of that sort after the last result from the previous page.<\/span><\/p>\n\n\n\n<p><span>This solution requires a few preconditions be met:<\/span><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span>The search request must specify a sort order.<\/span><\/li>\n\n\n<li><span>The sort order must impose a total order on the results.\u00a0 Without this, any results which share the same sort value might be left out when handling the page navigation boundaries.\u00a0 A common solution to this is to always include the document ID as the final sort criteria.\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span>For example, if you want to sort by [\u201cname\u201d, \u201c-age\u201d], instead of sort by [\u201cname\u201d, \u201c-age\u201d, \u201c_id\u201d].<\/span><\/li>\n\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><i><span>Example:<\/span><\/i><\/h5>\n\n\n\n<p><span>User searches for <\/span><i><span>description:light<\/span><\/i><span> and sorts by <\/span><i><span>[\u201cname\u201d, \u201c_id\u201d]<\/span><\/i><\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]{<br \/>\n\u00a0\u00a0&#8220;query&#8221;: {<br \/>\n\u00a0\u00a0\u00a0\u00a0&#8220;query&#8221;: &#8220;description:light&#8221;<br \/>\n\u00a0\u00a0},<br \/>\n\u00a0\u00a0&#8220;sort&#8221;: [<br \/>\n\u00a0\u00a0\u00a0\u00a0&#8220;name&#8221;,<br \/>\n\u00a0\u00a0\u00a0\u00a0&#8220;_id&#8221;<br \/>\n\u00a0\u00a0],<br \/>\n\u00a0\u00a0&#8220;search_after&#8221;: [<br \/>\n\u00a0\u00a0\u00a0\u00a0&#8220;Anchor Summer Beer&#8221;,<br \/>\n\u00a0\u00a0\u00a0\u00a0&#8220;anchor_brewing-anchor_summer_beer&#8221;<br \/>\n\u00a0\u00a0]<br \/>\n}[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>There is a similar parameter named <\/span><i><span>search_before<\/span><\/i><span> to navigate to the previous page of results. <\/span><span>Instead of providing the sort value from the last result, the application provides the sort value from the first result of the current page.\u00a0 In all other ways, this behaves the same.<\/span><\/p>\n\n\n\n<p><span>With search_after\/search_before paginations, the heap memory requirement of deeper page searches is made proportional to the requested page size alone. So it reduces the heap memory requirement of deeper page searches significantly down from the offset+from values.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>This feature is available since the Couchbase server release &#8211; 6.6.1<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Avoid Duplicate Search Clauses In Composite Queries<\/b><\/h3>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>We know that this indeed sounds like a naive suggestion. But a few times, it is observed that the customer applications while converting the end-user search queries into an FTS backend search request end up having many duplicate child search clauses in their composite queries.\u00a0\u00a0<\/span><\/p>\n\n\n\n<p><em><span>Example:<\/span><\/em><\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]&#8221;disjuncts&#8221;: [<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;field&#8221;: &#8220;merchantID&#8221;,<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;match&#8221;: &#8220;9447611071-0&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;field&#8221;: &#8220;merchantID&#8221;,<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;match&#8221;: &#8220;9447611071-0&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;field&#8221;: &#8220;merchantID&#8221;,<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;match&#8221;: &#8220;9447611071-0&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;field&#8221;: &#8220;merchantID&#8221;,<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;match&#8221;: &#8220;9447611071-0&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0][\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p><span>This would result in a lot of redundant work in the Full-Text Search server backend due to the duplicated query contents.<\/span><\/p>\n\n\n\n<p><span>Users need to be aware that the Search service won\u2019t perform any deduplication of the given queries. It respects and executes the complete query request in the backend.\u00a0 Hence the users need to exercise due diligence in ensuring that optimum queries are formed before hitting the Search service.<\/span><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>Please watch out this space for more search query performance tuning and index management tips for\u00a0 Full-Text Search service.<\/p>\n\n\n\n<p>Another interesting read about text analysis for FTS newbies <a href=\"https:\/\/www.couchbase.com\/blog\/full-text_search_text_analysis\/\">here\u00a0<\/a><\/p>\n\n\n\n<p><blockquote class=\"wp-embedded-content\" data-secret=\"mQiz5CFR8P\"><a href=\"https:\/\/www.couchbase.com\/blog\/full-text_search_text_analysis\/\">Text Analysis within a Full-Text Search Engine<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Text Analysis within a Full-Text Search Engine&#8221; &#8212; The Couchbase Blog\" src=\"https:\/\/www.couchbase.com\/blog\/full-text_search_text_analysis\/embed\/#?secret=mwZb3gYZOS#?secret=mQiz5CFR8P\" data-secret=\"mQiz5CFR8P\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tuning the search query performance is a very important aspect of Full-Text Search as it helps business-critical applications in meeting the SLA requirements of latency and throughput. Without much preamble, let me share a few useful recommendations for troubleshooting your search performance. All of these suggestions are agnostic of any hardware configurations, cluster topologies, and [&hellip;]<\/p>\n","protected":false},"author":26446,"featured_media":1726,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[136,54,324],"tags":[],"ppma_author":[352],"class_list":["post-1727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-couchbase-server","category-full-text-search"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Full-Text Search - 5 Tips To Improve Your Query Performance<\/title>\n<meta name=\"description\" content=\"Search Query Performance optimisation or troubleshooting tips for couchbase Full Text Search. Tune for query performance in couchbase search service.\" \/>\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.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Full-Text Search - 5 Tips To Improve Your Query Performance\" \/>\n<meta property=\"og:description\" content=\"Search Query Performance optimisation or troubleshooting tips for couchbase Full Text Search. Tune for query performance in couchbase search service.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-02T14:18:17+00:00\" \/>\n<meta name=\"author\" content=\"Sreekanth Sivasankaran\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreekanth Sivasankaran\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/\"},\"author\":{\"name\":\"Sreekanth Sivasankaran\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/7bbda3cf57beae8bd9cba686c0c6fe7a\"},\"headline\":\"Full-Text Search &#8211; 5 Tips To Improve Your Query Performance\",\"datePublished\":\"2020-10-02T14:18:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/\"},\"wordCount\":1445,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/eventing.jpg\",\"articleSection\":[\"Best Practices and Tutorials\",\"Couchbase Server\",\"Full-Text Search\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/\",\"name\":\"Full-Text Search - 5 Tips To Improve Your Query Performance\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/eventing.jpg\",\"datePublished\":\"2020-10-02T14:18:17+00:00\",\"description\":\"Search Query Performance optimisation or troubleshooting tips for couchbase Full Text Search. Tune for query performance in couchbase search service.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/eventing.jpg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/eventing.jpg\",\"width\":1400,\"height\":553},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/full-text-search-tips-for-query-performance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Full-Text Search &#8211; 5 Tips To Improve Your Query Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/7bbda3cf57beae8bd9cba686c0c6fe7a\",\"name\":\"Sreekanth Sivasankaran\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=ga60af16118050d1ea3a927388dc4dfb7\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g\",\"caption\":\"Sreekanth Sivasankaran\"},\"description\":\"Sreekanth Sivasankaran is a Principal Engineer\\\/Senior Engineering manager at Couchbase R&amp;D. He leads the design and development of distributed and highly performant Search functionality. And he has over 17 years of product development experience in various domains like telecom, handsets, enterprise software, big data technologies, and distributed systems.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/author\\\/sreekanth-sivasankaran\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Full-Text Search - 5 Tips To Improve Your Query Performance","description":"Search Query Performance optimisation or troubleshooting tips for couchbase Full Text Search. Tune for query performance in couchbase search service.","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.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/","og_locale":"en_US","og_type":"article","og_title":"Full-Text Search - 5 Tips To Improve Your Query Performance","og_description":"Search Query Performance optimisation or troubleshooting tips for couchbase Full Text Search. Tune for query performance in couchbase search service.","og_url":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/","og_site_name":"The Couchbase Blog","article_published_time":"2020-10-02T14:18:17+00:00","author":"Sreekanth Sivasankaran","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sreekanth Sivasankaran","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/"},"author":{"name":"Sreekanth Sivasankaran","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/7bbda3cf57beae8bd9cba686c0c6fe7a"},"headline":"Full-Text Search &#8211; 5 Tips To Improve Your Query Performance","datePublished":"2020-10-02T14:18:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/"},"wordCount":1445,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/eventing.jpg","articleSection":["Best Practices and Tutorials","Couchbase Server","Full-Text Search"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/","url":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/","name":"Full-Text Search - 5 Tips To Improve Your Query Performance","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/eventing.jpg","datePublished":"2020-10-02T14:18:17+00:00","description":"Search Query Performance optimisation or troubleshooting tips for couchbase Full Text Search. Tune for query performance in couchbase search service.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/eventing.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/eventing.jpg","width":1400,"height":553},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/full-text-search-tips-for-query-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Full-Text Search &#8211; 5 Tips To Improve Your Query Performance"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/7bbda3cf57beae8bd9cba686c0c6fe7a","name":"Sreekanth Sivasankaran","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=ga60af16118050d1ea3a927388dc4dfb7","url":"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/01af11c4c81e84e518ab465b39b7a5b3c874de79270af74043cc3d4edb92ff4e?s=96&d=mm&r=g","caption":"Sreekanth Sivasankaran"},"description":"Sreekanth Sivasankaran is a Principal Engineer\/Senior Engineering manager at Couchbase R&amp;D. He leads the design and development of distributed and highly performant Search functionality. And he has over 17 years of product development experience in various domains like telecom, handsets, enterprise software, big data technologies, and distributed systems.","url":"https:\/\/www.couchbase.com\/blog\/author\/sreekanth-sivasankaran\/"}]}},"acf":[],"authors":[{"term_id":352,"user_id":26446,"is_guest":0,"slug":"sreekanth-sivasankaran","display_name":"Sreekanth Sivasankaran","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/26446"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=1727"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/1727\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/1726"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=1727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=1727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=1727"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}