Skip to content
Browse files

add example for attachment with default field.

  • Loading branch information...
1 parent e14945c commit fae7be0e182b5f584e1f130506f0371dc534836e Robert Newson committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 README.md
View
5 README.md
@@ -206,7 +206,10 @@ doc.add("value", {"store":"yes"});
// Add but don't analyze.
doc.add("don't analyze me", {"index":"not_analyzed"});
-// Extract text from the named attachment and index it (but not store it).
+// Extract text from the named attachment and index it.
+doc.attachment("attachment name");
+
+// Extract text from the named attachment and index it to a separate field
doc.attachment("attachment name", {"field":"attachments"});
</pre>

0 comments on commit fae7be0

Please sign in to comment.
Something went wrong with that request. Please try again.