Hi Hermes, > I need to find by keword on couchdb databse use a query type "Like %key%"
Can you be more explicit? Are you willing to do full text search? Are you also interested in looking for beginning of words? Are you also interested in looking for "phrases" (a sequence of words)? If you answered "yes" to all these questions, you should be interested in this map function: https://github.com/Hypertopic/Cassandre/blob/master/views/kwic/map.js This view has to be simplified (to get rid of `speeches` and `corpora` management) but the idea is there: indexing a "sliding window" of characters in the text, and calling them with `startkey="my keyword"&endkey="my keyword\ufff0"`. With an index twice as big as this one, you could also do the same sliding window backwards and search for word endings. However, if you really need to search inner parts of words, you would have to slide the window one character at a time (instead of one word at a time), which would result in an index ten times bigger... and, trust me, you probably don't want this. But, well... All of these are already advanced MapReduce algorithms, I am not sure it is the best example to begin with CouchDB. If you need less control over the full text indexing, you can also plug a full text indexer to do that for you: https://github.com/rnewson/couchdb-lucene Regards, Aurélien
