Skip to content

Commit

Permalink
add documentation for nested, object and _parent
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Muetton committed Nov 26, 2012
1 parent 23f591b commit ea31910
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea31910

Please sign in to comment.