Permalink
Browse files

expand index-everything example

  • Loading branch information...
1 parent 999e0a2 commit 0b6780f9c1ee470b9ac821240ade16f0a94677f2 Robert Newson committed Apr 5, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.md
View
11 README.md
@@ -90,12 +90,23 @@ function(doc) {
break;
default:
ret.field(key, obj[key]);
+ /* Uncomment next line to include
+ * all attributes into a single field.
+ */
+ // ret.field("all", obj[key]);
break;
}
}
}
+ // Index all attributes
idx(doc);
+
+ // Index all attachments
+ for(var a in doc._attachments) {
+ ret.attachment("attachment", a);
+ }
+
return ret;
}
</pre>

0 comments on commit 0b6780f

Please sign in to comment.