Skip to content

Instantly share code, notes, and snippets.

@devandclick
Created September 9, 2016 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devandclick/a116e68861060f0f19d6a6ce648d484d to your computer and use it in GitHub Desktop.
Save devandclick/a116e68861060f0f19d6a6ce648d484d to your computer and use it in GitHub Desktop.
fos_elastica.yml
fos_elastica:
clients:
default: { host: localhost, port: 9200 }
serializer:
callback_class: FOS\ElasticaBundle\Serializer\Callback
serializer: serializer
indexes:
fpc:
client: default
settings:
index:
analysis:
analyzer:
simple:
type: simple
custom_french_analyzer:
type: custom
tokenizer: letter
filter: ["asciifolding", "lowercase", "french_stem", "stop_fr"]
custom_autocomplete_analyzer:
type: custom
tokenizer: standard
filter : [standard, autocomplete_filter, lowercase, asciifolding, autocomplete_filter]
filter:
stop_fr:
type: "stop"
stopwords: ["l", "m", "t", "qu", "n", "s", "j", "d"]
autocomplete_filter:
type: edgeNGram
side: front
min_gram: 1
max_gram: 20
types:
recherche:
mappings:
expression: { analyzer: custom_french_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\Recherche
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
utilisateur:
mappings:
username: { analyzer: custom_french_analyzer }
ancienNumeroClient: { analyzer: custom_french_analyzer }
telephone: { analyzer: custom_french_analyzer }
email: { analyzer: custom_french_analyzer }
isActive: { analyzer: custom_french_analyzer }
nomSociete: { analyzer: custom_french_analyzer }
nom: { analyzer: custom_french_analyzer }
prenom: { analyzer: custom_french_analyzer }
portable: { analyzer: custom_french_analyzer }
skype: { analyzer: custom_french_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\Utilisateur
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
pays:
mappings:
nom: { analyzer: custom_french_analyzer }
alpha2code: { analyzer: custom_french_analyzer }
alpha3code: { analyzer: custom_french_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\Pays
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
planche:
mappings:
format: { analyzer: custom_french_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\Planche
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
serie:
mappings:
nom: { analyzer: custom_autocomplete_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\Serie
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
article:
mappings:
reference: { analyzer: custom_french_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\Article
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
formatFini:
mappings:
longueurXLargeur: { analyzer: custom_french_analyzer }
persistence:
driver: orm
model: CorpBundle\Entity\FormatFini
provider: ~
listener:
insert: true
update: true
delete: true
finder: ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment