couchrest_model/views/word_count/count-map.js
2008-06-02 09:36:48 -07:00

2 lines
No EOL
162 B
JavaScript

function(doc){var words=doc.text.split(/\W/).map(function(w){return w.toLowerCase()});words.forEach(function(word){if(word.length>0)emit([word,doc.title],1);});}