Permalink
Browse files

add documentation for nested, object and _parent

  • Loading branch information...
1 parent 23f591b commit ea3191033f5b2f5598ec4735b635060a44929cfb Julien Muetton committed Nov 26, 2012
Showing with 35 additions and 0 deletions.
  1. +35 −0 README.md
View
@@ -139,6 +139,41 @@ Elasticsearch type is comparable to Doctrine entity repository.
Our type is now available as a service: `foq_elastica.index.website.user`. It is an instance of `Elastica_Type`.
+### Declaring parent field
+
+ foq_elastica:
+ clients:
+ default: { host: localhost, port: 9200 }
+ indexes:
+ website:
+ client: default
+ types:
+ comment:
+ mappings:
+ post: {_parent: { type: "post", identifier: "id" } }
+ date: { boost: 5 }
+ content: ~
+
+### Declaring `nested` or `object`
+
+ foq_elastica:
+ clients:
+ default: { host: localhost, port: 9200 }
+ indexes:
+ website:
+ client: default
+ types:
+ post:
+ mappings:
+ date: { boost: 5 }
+ title: { boost: 3 }
+ content: ~
+ comments:
+ type: "nested"
+ properties:
+ date: { boost: 5 }
+ content: ~
+
### Populate the types
php app/console foq:elastica:populate

0 comments on commit ea31910

Please sign in to comment.