Return documents that contain text as parameter


#1

Can anyone help how do I return documents that contain the supplied text as a parameter?
This text should be researched in the fields: “nome”, “fone” (array), “razao”, “produto”, “logradouro”, “titulos” (array) and “titular” (array).

This query is similar to LIKE ‘%text%’ SQL, the text may be the beginning, middle or end.
Please can someone help?
Below is the structure of my documents.
Need to do this in Couchbase Lite.

{
  "id": "E2915",
  "nome": "Botoni Bebidas",
  "fone": [
    {
      "numero": "3421 3400",
      "ddd": "55"
    },
    {
      "numero": "3421 1999",
      "ddd": "55"
    },
    {
      "numero": "3426 4421",
      "ddd": "55"
    },
    {
      "numero": "9912 1271",
      "ddd": "55"
    },
    {
      "numero": "9174 9767",
      "ddd": "55"
    },
    {
      "numero": "8415 3277",
      "ddd": "55"
    },
    {
      "numero": "8112 3251",
      "ddd": "55"
    }
  ],
  "razao": "Paulo Evandro Fantinel Botoni",
  "email": "botoni24horas@hotmail.com",
  "homepage": "www.botoni.com.br",
  "complemento": "",
  "nr": "603",
  "cep": "97542450",
  "peso": "17",
  "cidade": "Alegrete",
  "bairro": "CENTRO",
  "logradouro": "Mariz e Barros",
  "produto": "- BEBIDAS EM GERAL, DOMINGOS CHURRASCO POR KILO\r\n - NO INVERNO MOCOTÓ;\r\n - GELO, ÁGUA, \r\n - REPRESENTAÇÃO ÁGUA ELLAN (EXCLUSIVIDADE)\r\n - CORTES ESPECIAIS PARA CHURRASCO, DISTRIBUIDOR FONTE DA ILHA;\r\n - PEIXES E FRUTOS DO MAR, PIZZAS, MASSAS E LASANHAS,\r\n - DISTRIBUIDORES ERVA MATE CHARME",
  "latitude": "-29,7860660552979",
  "longitude": "-55,7838821411133",
  "facebook": "",
  "titulos": [
    {
      "descricao": "CHURRASCO POR KILO E FRANGO ASSADO"
    },
    {
      "descricao": "BARES"
    },
    {
      "descricao": "GÁS"
    },
    {
      "descricao": "ÁGUA MINERAL"
    },
    {
      "descricao": "DISTRIBUIDORES DE BEBIDAS"
    },
    {
      "descricao": "GELO"
    }
  ],
  "titular": [
    {
      "descricao": "Fernanda Sasciloto Botoni"
    },
    {
      "descricao": "PAULO EVANDRO FANTINEL BOTONI"
    }
  ],
  "tipo": "E",
  "blativo": "0"
}

#2

Couchbase Lite on iOS has full-text query capability. It’s not available on the other platforms yet. (You haven’t said what platform you’re developing for.)


#3

Thanks for the feedback!
I’m developing for Android.
I am using Xamarin Studio and Android Xamarin with C #.
Is it possible?