{"id":8849,"date":"2020-07-07T07:00:08","date_gmt":"2020-07-07T14:00:08","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=8849"},"modified":"2025-06-13T23:42:34","modified_gmt":"2025-06-14T06:42:34","slug":"first-class-sql-full-text-search-couchbase","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/first-class-sql-full-text-search-couchbase\/","title":{"rendered":"FIRST CLASS SQL para B\u00daSQUEDA DE TEXTO COMPLETO"},"content":{"rendered":"<p>Con el tiempo, el sector de las bases de datos se ha dado cuenta de que la b\u00fasqueda de texto completo y SQL son dos caras de la misma moneda.  La b\u00fasqueda de texto necesita m\u00e1s procesamiento de consultas, y el procesamiento de consultas necesita la b\u00fasqueda de texto para filtrar eficazmente los patrones de texto.   Las bases de datos SQL han incorporado la b\u00fasqueda de texto completo en su interior, aunque para sistemas SMP de un solo nodo.<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>SQL Server admite <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/relational-databases\/search\/full-text-search?view=sql-server-ver15\">CONTAINS() para la b\u00fasqueda de texto<\/a><\/li>\n<li>Oracle admite <a href=\"https:\/\/docs.oracle.com\/cd\/B28359_01\/text.111\/b28303\/query.htm#BABGAIHJ\">CONTAINS() para la b\u00fasqueda de texto<\/a><\/li>\n<li>MySQL ha a\u00f1adido f<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/fulltext-natural-language.html\">Soporte de texto completo\u00a0<\/a><\/li>\n<li>PostgreSQL dispone de <a href=\"https:\/\/www.postgresql.org\/docs\/12\/functions-textsearch.html\">b\u00fasqueda de texto compatible<\/a> durante mucho tiempo.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Couchbase Full-Text Search (FTS) se crea con tres motivaciones principales:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">B\u00fasqueda transparente en varios campos de un documento<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Vaya m\u00e1s all\u00e1 de la coincidencia exacta de valores proporcionando <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-query-types.html\"><span style=\"font-weight: 400\">derivaci\u00f3n ling\u00fc\u00edstica<\/span><\/a><span style=\"font-weight: 400\">, <a href=\"https:\/\/www.couchbase.com\/blog\/es\/fuzzy-matching\/\">emparejamiento difuso<\/a>etc.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Proporcionar los resultados de b\u00fasqueda en funci\u00f3n de la relevancia<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">FTS lo consigue con un \u00edndice invertido y un rico conjunto de <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/fts-query-types.html\"><span style=\"font-weight: 400\">predicados de consulta<\/span><\/a><span style=\"font-weight: 400\">: desde la simple b\u00fasqueda de palabras a la concordancia de patrones, pasando por complejos predicados de rango.    Adem\u00e1s de la b\u00fasqueda, admite la agregaci\u00f3n mediante <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/fts\/fts-response-object-schema.html#search-facets\"><span style=\"font-weight: 400\">facetas de b\u00fasqueda<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p>En el mundo NoSQL, Lucene es un \u00edndice de b\u00fasqueda popular y tambi\u00e9n lo son los servidores de b\u00fasqueda basados en Lucene: <a href=\"https:\/\/lucene.apache.org\/solr\/\">Solr<\/a> y <a href=\"https:\/\/elastic.co\">Elasticsearch<\/a>.  Siguiendo a sus primos RDBMS, <a href=\"https:\/\/www.elastic.co\/\"><span style=\"font-weight: 400\">Elasticsearch<\/span><\/a><span style=\"font-weight: 400\">, <\/span><a href=\"https:\/\/opendistro.github.io\/for-elasticsearch\/\"><span style=\"font-weight: 400\">Opendistro para Elasticsearch<\/span><\/a><span style=\"font-weight: 400\"> todos han a\u00f1adido SQL para sus b\u00fasquedas.  Couchbase introdujo el servicio de texto completo,\u00a0<a href=\"https:\/\/docs.couchbase.com\/server\/current\/fts\/full-text-intro.html\">FTS<\/a> y ha seguido con el apoyo a la b\u00fasqueda dentro de N1QL.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/www.couchbase.com\/blog\/es\/introducing-fts-with-n1ql\/\"><span style=\"font-weight: 400\">FTS con N1QL<\/span><\/a><\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/www.elastic.co\/what-is\/elasticsearch-sql\"><span style=\"font-weight: 400\">Elasticsearch con SQL<\/span><\/a><\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/opendistro.github.io\/for-elasticsearch-docs\/docs\/sql\/\"><span style=\"font-weight: 400\">Opendistro para Elasticsearch con SQL<\/span><\/a><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Y el reci\u00e9n llegado a las b\u00fasquedas, MongoDB, ha a\u00f1adido <\/span><a href=\"https:\/\/docs.atlas.mongodb.com\/atlas-search\/\"><span style=\"font-weight: 400\">buscar en MQL<\/span><\/a><span style=\"font-weight: 400\"> utilizando Lucene en su oferta Atlas. <\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>Las implementaciones SQL de <a href=\"https:\/\/www.elastic.co\/what-is\/elasticsearch-sql\">Elasticsearch con SQL<\/a> y <a href=\"https:\/\/docs.atlas.mongodb.com\/atlas-search\/\">MQL de MongoDB<\/a> viene con una larga lista de limitaciones.<\/strong><\/p>\n<p><span style=\"font-weight: 400\"><a href=\"https:\/\/www.elastic.co\/what-is\/elasticsearch-sql\">Elasticsearch con SQL<\/a><\/span> ha enumerado aqu\u00ed sus limitaciones:<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Lista completa: <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/sql-limitations.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/sql-limitations.html<\/a><\/li>\n<li>Adem\u00e1s, el lenguaje es comprensiblemente limitado debido a su incipiente aplicaci\u00f3n.\n<ul>\n<li>No admite operaciones de conjuntos, uniones, etc.<\/li>\n<li>Sin funciones de ventana.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\"><a href=\"https:\/\/docs.atlas.mongodb.com\/atlas-search\/\">MQL de MongoDB<\/a> La integraci\u00f3n de b\u00fasquedas viene acompa\u00f1ada de una larga lista de limitaciones.<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Disponible s\u00f3lo en el servicio de b\u00fasqueda Atlas, no en el producto on-prem.<\/li>\n<li>La b\u00fasqueda s\u00f3lo puede ser la PRIMERA operaci\u00f3n dentro de la cadena aggregate().<\/li>\n<li>Disponible s\u00f3lo dentro de la canalizaci\u00f3n de agregaci\u00f3n (aggregate()) y no en find(), insert(), update(), remove() otras operaciones.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">La integraci\u00f3n con su API aggregate(), viene con algunas limitaciones: S\u00f3lo puede ser la primera operaci\u00f3n del pipeline no disponible en su base de datos on-prem. <\/span>Las caracter\u00edsticas que discutimos en este art\u00edculo est\u00e1n en Couchbase 6.5 y superiores.<\/p>\n<p>Aqu\u00ed tienes un ejemplo de N1QL:<\/p>\n<pre class=\"theme:familiar font-size:17 line-height:20 whitespace-before:2 whitespace-after:2 lang:mysql decode:true\">SELECT country, \r\n               city, \r\n               name, \r\n               ROW_NUMBER() OVER(ORDER BY country DESC, city DESC) rownum\r\nFROM `travel-sample` AS t1\r\nWHERE t1.type = \"hotel\" AND SEARCH(t1.description, \"garden\") \r\nAND ANY r in reviews satisfies r.ratings.Service &gt; 3 END;\r\n<\/pre>\n<p><span style=\"font-weight: 400\">Esto incluye lo siguiente adem\u00e1s de SEARCH():<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Proyecci\u00f3n de los campos de los documentos: pa\u00eds, ciudad, nombre<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Generaci\u00f3n del n\u00famero de fila mediante la funci\u00f3n de ventana ROW_NUMBER()<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Predicado escalar adicional t1.type = \"hotel\"<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Predicado de matriz sobre revisiones (CUALQUIERA)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Obtendr\u00e1 el beneficio COMPLETO de un procesamiento de consultas de primera clase, adem\u00e1s de una b\u00fasqueda eficiente.  Eso no es todo - hay a\u00fan m\u00e1s con N1QL. <\/span><span style=\"font-weight: 400\">Los beneficios y <\/span><a href=\"https:\/\/www.couchbase.com\/blog\/es\/unreasonable-effectiveness-of-sql\/\"><span style=\"font-weight: 400\">eficacia de SQL<\/span><\/a><span style=\"font-weight: 400\"> son bien conocidos.  N1QL es SQL para JSON. El objetivo de N1QL es ofrecer a desarrolladores y empresas un lenguaje expresivo, potente y completo para consultar, transformar y manipular datos JSON.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Las ventajas de utilizar <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/index.html\"><span style=\"font-weight: 400\">N1QL<\/span><\/a><span style=\"font-weight: 400\"> con la b\u00fasqueda son los siguientes:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Predicados:<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">FTS es excelente para las b\u00fasquedas basadas en la relevancia. SQL es excelente para el procesamiento de consultas complejas: predicados complejos, predicados de matriz, escalares adicionales, etc.\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/arithmetic.html\"><span style=\"font-weight: 400\">Operadores<\/span><\/a><span style=\"font-weight: 400\"> y <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/aggregatefun.html\"><span style=\"font-weight: 400\">funciones<\/span><\/a><span style=\"font-weight: 400\">:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Tratamiento de predicados (tratamiento de filtros)<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Predicados escalares y de matriz adicionales<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Las funciones escalares y de matriz tambi\u00e9n pueden utilizarse dentro de los predicados<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Subconsultas<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Subconsultas correlacionadas<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Subconsultas no correlacionadas\u00a0<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/aggregatefun.html\"><span style=\"font-weight: 400\">\u00c1ridos<\/span><\/a><\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/windowfun.html\"><span style=\"font-weight: 400\">Funciones de ventana<\/span><\/a><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">procesamiento JOIN<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">N1QL puede hacer INNER JOIN, LEFT OUTER JOIN, (limitado) RIGHT OUTER JOIN, NEST, UNNEST<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">JOINS entre cubos, colecciones y resultados de subconsultas.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/union.html\"><span style=\"font-weight: 400\">Operaciones SET<\/span><\/a>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">UNI\u00d3N<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">UNI\u00d3N TODOS<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">EXCEPTO<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">EXCEPTO TODOS<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">INTERSECT<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">INTERSECTAR TODO<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/with.html\"><span style=\"font-weight: 400\">CTE<\/span><\/a><span style=\"font-weight: 400\"> (Expresi\u00f3n com\u00fan de tabla) y <\/span><a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/let.html\"><span style=\"font-weight: 400\">Cl\u00e1usula LET<\/span><\/a><span style=\"font-weight: 400\"> para mejorar la redacci\u00f3n de consultas<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">M\u00e1s que SEARCH()<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Adem\u00e1s de SELECT, puede utilizar el predicado SEARCH() en las cl\u00e1usulas WHERE de las sentencias INSERT, UPDATE, DELETE, MERGE.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Puede PREPARAR estas sentencias y EJECUTARLAS repetida y eficazmente.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Obtendr\u00e1 la seguridad habitual a trav\u00e9s de los roles RBAC mediante GRANT &amp; REVOKE.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Productividad del desarrollador: Escriba la consulta en SQL, el lenguaje que ya conocen.<\/span><\/li>\n<\/ol>\n<p>Veamos c\u00f3mo ejecuta esto el motor N1QL.  Abhinav Dangeti de la ingenier\u00eda FTS de Couchbase ya ha escrito un <a href=\"https:\/\/www.couchbase.com\/blog\/es\/introducing-fts-with-n1ql\/\">gran blog que detalla la toma de decisiones y ejemplos<\/a>.  Este art\u00edculo pretende explicarlo visualmente con ejemplos adicionales en las categor\u00edas mencionadas anteriormente.<\/p>\n<h5><strong>1.  ARQUITECTURA para la EJECUCI\u00d3N DE CONSULTAS<\/strong><\/h5>\n<p>Hemos a\u00f1adido tres pasos importantes a la ejecuci\u00f3n de la consulta la consulta utiliza SEARCH() :<\/p>\n<ol>\n<li>El planificador considera el \u00edndice de b\u00fasqueda FTS como una de las rutas de acceso v\u00e1lidas si el predicado search() existe en la consulta.\n<ul>\n<li>Si se selecciona el \u00edndice de b\u00fasqueda, crea el plan enviando el predicado de b\u00fasqueda al \u00edndice FTS.<\/li>\n<\/ul>\n<\/li>\n<li>Cuando se selecciona el \u00edndice de b\u00fasqueda, el ejecutor emite la petici\u00f3n de b\u00fasqueda a uno de los nodos FTS (en lugar de la petici\u00f3n de escaneo al servicio de \u00edndice)<\/li>\n<li>Antes de finalizar los resultados de la b\u00fasqueda, el servicio de consulta vuelve a verificar la adecuaci\u00f3n del documento a los datos.<\/li>\n<\/ol>\n<div id=\"attachment_8852\" style=\"width: 855px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8852\" class=\"wp-image-8852\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-300x164.png\" alt=\"N1QL query execution with FTS\" width=\"845\" height=\"462\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-300x164.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-1024x559.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-768x420.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-1536x839.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-2048x1119.png 2048w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-20x11.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.02.40-PM-1320x721.png 1320w\" sizes=\"auto, (max-width: 845px) 100vw, 845px\" \/><\/a><p id=\"caption-attachment-8852\" class=\"wp-caption-text\">Ejecuci\u00f3n de consultas N1QL con FTS<\/p><\/div>\n<div id=\"attachment_8853\" style=\"width: 849px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8853\" class=\"wp-image-8853\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-300x127.png\" alt=\"Inside the Query Service\" width=\"839\" height=\"355\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-300x127.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-1024x433.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-768x325.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-1536x649.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-2048x865.png 2048w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-20x8.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-01-at-7.11.26-PM-1320x558.png 1320w\" sizes=\"auto, (max-width: 839px) 100vw, 839px\" \/><\/a><p id=\"caption-attachment-8853\" class=\"wp-caption-text\">Dentro de un servicio de consulta<\/p><\/div>\n<h5><\/h5>\n<h5><strong>2. PROCESAMIENTO DE PREDICADOS<\/strong><\/h5>\n<p>En la siguiente consulta, el predicado SEARCH() (predicado-2) se introduce en la petici\u00f3n de b\u00fasqueda FTS.  Todos los dem\u00e1s predicados son procesados por el motor de consulta despu\u00e9s de la b\u00fasqueda en la fase \"Filtro\", como se muestra en la figura anterior \"Dentro de un servicio de consulta\".  Hay una excepci\u00f3n.  Cuando el \u00edndice FTS ha creado un \u00edndice con <strong>Campo de tipo JSON (doc_config.type_field en el documento de definici\u00f3n del \u00edndice)<\/strong>\u00a0(en este caso tipo = \"hotel\") para crear el \u00edndice sobre el subconjunto del documento, tanto la selecci\u00f3n del \u00edndice como el pushdown de b\u00fasqueda aprovechan este predicado.  Incluso en este caso, el predicado se vuelve a aplicar despu\u00e9s de la obtenci\u00f3n del documento.<\/p>\n<pre class=\"theme:familiar font-size:17 line-height:20 whitespace-before:2 whitespace-after:2 lang:mysql decode:true\">SELECT country, \r\n               city, \r\n               name, \r\n               ROW_NUMBER() OVER(ORDER BY country DESC, city DESC) rownum\r\nFROM `travel-sample` AS t1\r\nWHERE \r\nt1.type = \"hotel\"   \/* predicate-1 *\/\r\nAND SEARCH(t1.description, \"garden\") \/* predicate-2 *\/\r\nAND ANY r in reviews satisfies r.ratings.Service &gt; 3 END; \/* predicate-2 *\/\r\n<\/pre>\n<h5><\/h5>\n<h5><strong>3. <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/operators.html\">OPERADORES<\/a> y <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/functions.html\">FUNCIONES<\/a><\/strong><\/h5>\n<p>He aqu\u00ed un ejemplo de consulta que aprovecha los operadores y las funciones.<\/p>\n<pre class=\"theme:familiar font-size:17 line-height:20 whitespace-before:2 whitespace-after:2 lang:mysql decode:true\">SELECT LOWER(country),   \/* scalar function *\/\r\n       city, \r\n       lastname || \" \" || firstname AS fullname   \/* string operator *\/\r\n       ROW_NUMBER() OVER(ORDER BY country DESC, city DESC) rownum   \/* window function *\/\r\nFROM `travel-sample` AS t1\r\nWHERE \r\nLOWER(t1.type) = \"hotel\"   \/* scalar function *\/\r\nAND SEARCH(t1.description, \"garden\") \r\nAND ARRAY_CONTAINS(public_likes, \"Joe Black\")  \/* Array function *\/\r\n<\/pre>\n<p>Este es el plan de consulta para esta consulta. IndexSearch realiza la solicitud de b\u00fasqueda FTS y se integra en el canal de ejecuci\u00f3n de la consulta.  Por lo tanto, la consulta se beneficia de todas las dem\u00e1s capacidades de N1QL.  Esto refleja las etapas de la tuber\u00eda en la figura anterior.<\/p>\n<div id=\"attachment_8856\" style=\"width: 1044px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8856\" class=\"wp-image-8856\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-300x190.png\" alt=\"Query plan with SEARCH()\" width=\"1034\" height=\"654\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-300x190.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-1024x647.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-768x485.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-1536x970.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-20x13.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM-1320x834.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-12.18.16-PM.png 1722w\" sizes=\"auto, (max-width: 1034px) 100vw, 1034px\" \/><\/a><p id=\"caption-attachment-8856\" class=\"wp-caption-text\">Plan de consulta con SEARCH()<\/p><\/div>\n<h5>4. Tratamiento JOIN<\/h5>\n<p>La funci\u00f3n SEARCH() tambi\u00e9n puede utilizarse como parte del proceso de uni\u00f3n.  En este caso, el FTS se utiliza para encontrar todas las ciudades que tienen hoteles con jard\u00edn y luego se unen con aeropuertos.<\/p>\n<pre class=\"theme:familiar font-size:17 line-height:20 whitespace-before:2 whitespace-after:2 lang:mysql decode:true\">SELECT hotel.name hname,\r\n       airport.city\r\nFROM `travel-sample` hotel \r\nLEFT OUTER JOIN `travel-sample` airport ON hotel.city = airport.city\r\nWHERE hotel.type = 'hotel'\r\n    AND SEARCH(hotel.description, \"garden\")\r\n    AND airport.type = 'airport' ;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_8857\" style=\"width: 777px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8857\" class=\"wp-image-8857\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-300x200.png\" alt=\"JOIN with SEARCH\" width=\"767\" height=\"511\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-300x200.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-1024x683.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-768x512.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-1536x1024.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-400x267.png 400w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-450x300.png 450w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-20x13.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM-1320x880.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-1.52.41-PM.png 1764w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><\/a><p id=\"caption-attachment-8857\" class=\"wp-caption-text\">JOIN with SEARCH<\/p><\/div>\n<h5>5. <a href=\"https:\/\/docs.couchbase.com\/server\/6.5\/n1ql\/n1ql-language-reference\/with.html\">Expresiones comunes de tabla (CTE).<\/a><\/h5>\n<p>N1QL en el servicio de consulta soporta CTEs no recursivos.   Puede utilizar SEARCH() dentro de cada expresi\u00f3n. La tabla derivada de esa expresi\u00f3n (hotel y aeropuerto) se utilizan como espacios clave dentro de la consulta.<\/p>\n<pre class=\"theme:familiar font-size:17 line-height:20 whitespace-before:2 whitespace-after:2 lang:mysql decode:true\">WITH hotel AS (\r\n    SELECT name,\r\n           city\r\n    FROM `travel-sample`\r\n    WHERE type = 'hotel'\r\n        AND search(description, \"garden\")),\r\nairport AS (\r\n    SELECT name,\r\n           city\r\n    FROM `travel-sample`\r\n    WHERE type = 'airport'\r\n        AND SEARCH(city, \"angeles\"))\r\nSELECT hotel.name hname,\r\n       airport.city\r\nFROM hotel\r\nINNER JOIN airport ON hotel.city = airport.city\r\nORDER BY airport.city,\r\n         hotel.name;\r\n<\/pre>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-02-at-3.00.13-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8858\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2020\/07\/Screen-Shot-2020-07-02-at-3.00.13-PM-198x300.png\" alt=\"\" width=\"536\" height=\"812\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-3.00.13-PM-198x300.png 198w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-3.00.13-PM-300x454.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-3.00.13-PM-13x20.png 13w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/Screen-Shot-2020-07-02-at-3.00.13-PM.png 518w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<h5><strong>5. Uso en UPDATEs<\/strong><\/h5>\n<p>SEARCH() puede utilizarse en cualquier lugar donde se permita un predicado dentro de otras sentencias DML.<\/p>\n<pre class=\"theme:familiar font-size:17 line-height:20 whitespace-before:2 whitespace-after:2 lang:mysql decode:true\">\/* INSERT INTO... SELECT statement. *\/\r\nINSERT INTO mybucket (KEY id, VALUES v)\r\n          SELECT meta().id  id, v \r\n          FROM `travel-sample` v\r\n          WHERE SEARCH(v, \"+type:hotel  +description:clean\");\r\n\r\n\/* DELETE statement *\/\r\nDELETE FROM `travel-sample` WHERE SEARCH(v, \"+type:hotel +description:clean\");\r\n\r\n\/* UPDATE statement *\/\r\nUPDATE `travel-sample` SET new_field = \"search n update!\" WHERE SEARCH(v, \"+type:hotel +description:clean\"); \r\n\r\n\r\n<\/pre>\n<h5>Los ejemplos pueden fluir mucho tiempo.  He mostrado ejemplos comunes. Se utiliza en varias sentencias SQL (DMLs)<\/h5>\n<h5><strong>Conclusi\u00f3n<\/strong>:<\/h5>\n<p>Couchbase FTS proporciona un motor de b\u00fasqueda de texto escalable y distribuido.  Lo hemos integrado perfectamente en N1QL en el servicio de consultas de Couchbase para que obtengas toda la potencia de las consultas con toda la potencia de la b\u00fasqueda.   Hay m\u00e1s innovaci\u00f3n sobre esto en la tuber\u00eda. Permanece atento.<\/p>","protected":false},"excerpt":{"rendered":"<p>Over time, the database industry has realized full-text search and SQL are two sides of the same coin.\u00a0 Text search needs further query processing, query processing needs text search to efficiently filter for text patterns.\u00a0 \u00a0The SQL databases have added [&hellip;]<\/p>","protected":false},"author":55,"featured_media":8850,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1814,1815,1821,2165,1812],"tags":[1584,1292,1261],"ppma_author":[8929],"class_list":["post-8849","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-best-practices-and-tutorials","category-couchbase-architecture","category-full-text-search","category-n1ql-query","tag-bleve","tag-elasticsearch","tag-json"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FIRST CLASS SQL for FULL-TEXT SEARCH - The Couchbase Blog<\/title>\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\/es\/first-class-sql-full-text-search-couchbase\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FIRST CLASS SQL for FULL-TEXT SEARCH\" \/>\n<meta property=\"og:description\" content=\"Over time, the database industry has realized full-text search and SQL are two sides of the same coin.\u00a0 Text search needs further query processing, query processing needs text search to efficiently filter for text patterns.\u00a0 \u00a0The SQL databases have added [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/first-class-sql-full-text-search-couchbase\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-07T14:00:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T06:42:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1300\" \/>\n\t<meta property=\"og:image:height\" content=\"1244\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Keshav Murthy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rkeshavmurthy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Keshav Murthy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/\"},\"author\":{\"name\":\"Keshav Murthy\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636\"},\"headline\":\"FIRST CLASS SQL for FULL-TEXT SEARCH\",\"datePublished\":\"2020-07-07T14:00:08+00:00\",\"dateModified\":\"2025-06-14T06:42:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/\"},\"wordCount\":1197,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg\",\"keywords\":[\"bleve\",\"elasticsearch\",\"JSON\"],\"articleSection\":[\"Application Design\",\"Best Practices and Tutorials\",\"Couchbase Architecture\",\"Full-Text Search\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/\",\"name\":\"FIRST CLASS SQL for FULL-TEXT SEARCH - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg\",\"datePublished\":\"2020-07-07T14:00:08+00:00\",\"dateModified\":\"2025-06-14T06:42:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg\",\"width\":1300,\"height\":1244},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FIRST CLASS SQL for FULL-TEXT SEARCH\"}]},{\"@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\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636\",\"name\":\"Keshav Murthy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4e51d72fc07c662aa791316deafffac4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g\",\"caption\":\"Keshav Murthy\"},\"description\":\"Keshav Murthy is a Vice President at Couchbase R&amp;D. Previously, he was at MapR, IBM, Informix, Sybase, with more than 20 years of experience in database design &amp; development. He lead the SQL and NoSQL R&amp;D team at IBM Informix. He has received two President's Club awards at Couchbase, two Outstanding Technical Achievement Awards at IBM. Keshav has a bachelor's degree in Computer Science and Engineering from the University of Mysore, India, holds eleven US patents and has four US patents pending.\",\"sameAs\":[\"https:\/\/blog.planetnosql.com\/\",\"https:\/\/x.com\/rkeshavmurthy\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/keshav-murthy\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"FIRST CLASS SQL for FULL-TEXT SEARCH - The Couchbase Blog","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\/es\/first-class-sql-full-text-search-couchbase\/","og_locale":"es_MX","og_type":"article","og_title":"FIRST CLASS SQL for FULL-TEXT SEARCH","og_description":"Over time, the database industry has realized full-text search and SQL are two sides of the same coin.\u00a0 Text search needs further query processing, query processing needs text search to efficiently filter for text patterns.\u00a0 \u00a0The SQL databases have added [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/es\/first-class-sql-full-text-search-couchbase\/","og_site_name":"The Couchbase Blog","article_published_time":"2020-07-07T14:00:08+00:00","article_modified_time":"2025-06-14T06:42:34+00:00","og_image":[{"width":1300,"height":1244,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg","type":"image\/jpeg"}],"author":"Keshav Murthy","twitter_card":"summary_large_image","twitter_creator":"@rkeshavmurthy","twitter_misc":{"Written by":"Keshav Murthy","Est. reading time":"8 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/"},"author":{"name":"Keshav Murthy","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636"},"headline":"FIRST CLASS SQL for FULL-TEXT SEARCH","datePublished":"2020-07-07T14:00:08+00:00","dateModified":"2025-06-14T06:42:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/"},"wordCount":1197,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg","keywords":["bleve","elasticsearch","JSON"],"articleSection":["Application Design","Best Practices and Tutorials","Couchbase Architecture","Full-Text Search","SQL++ \/ N1QL Query"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/","url":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/","name":"FIRST CLASS SQL for FULL-TEXT SEARCH - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg","datePublished":"2020-07-07T14:00:08+00:00","dateModified":"2025-06-14T06:42:34+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2020\/07\/triangle1-e1593651195823.jpg","width":1300,"height":1244},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/first-class-sql-full-text-search-couchbase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FIRST CLASS SQL for FULL-TEXT SEARCH"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","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":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c261644262bf98e146372fe647682636","name":"Keshav Murthy","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/4e51d72fc07c662aa791316deafffac4","url":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","caption":"Keshav Murthy"},"description":"Keshav Murthy es Vicepresidente de Couchbase R&amp;D. Anteriormente, estuvo en MapR, IBM, Informix, Sybase, con m\u00e1s de 20 a\u00f1os de experiencia en dise\u00f1o y desarrollo de bases de datos. Dirigi\u00f3 el equipo de I+D de SQL y NoSQL en IBM Informix. Ha recibido dos premios President's Club en Couchbase y dos premios Outstanding Technical Achievement en IBM. Keshav es licenciado en Inform\u00e1tica e Ingenier\u00eda por la Universidad de Mysore (India), es titular de once patentes estadounidenses y tiene cuatro pendientes.","sameAs":["https:\/\/blog.planetnosql.com\/","https:\/\/x.com\/rkeshavmurthy"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/keshav-murthy\/"}]}},"authors":[{"term_id":8929,"user_id":55,"is_guest":0,"slug":"keshav-murthy","display_name":"Keshav Murthy","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/af74df754db27152971d0aed2f323ead5a1f9fe5afd0209af91e12e784451224?s=96&d=mm&r=g","author_category":"","last_name":"Murthy","first_name":"Keshav","job_title":"","user_url":"https:\/\/blog.planetnosql.com\/","description":"Keshav Murthy es Vicepresidente de Couchbase R&amp;D. Anteriormente, estuvo en MapR, IBM, Informix, Sybase, con m\u00e1s de 20 a\u00f1os de experiencia en dise\u00f1o y desarrollo de bases de datos. Dirigi\u00f3 el equipo de I+D de SQL y NoSQL en IBM Informix. Ha recibido dos premios President's Club en Couchbase y dos premios Outstanding Technical Achievement en IBM. Keshav es licenciado en Inform\u00e1tica e Ingenier\u00eda por la Universidad de Mysore (India), es titular de diez patentes estadounidenses y tiene tres pendientes."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/8849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=8849"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/8849\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/8850"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=8849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=8849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=8849"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=8849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}