# How to add custom Lucene analyzer?

**URL:** <https://community.neo4j.com/t/how-to-add-custom-lucene-analyzer/3923>\
**Category:** Operations\
**Tags:** index\
**Created:** [December 18, 2018, 2:22pm UTC](https://community.neo4j.com/t/how-to-add-custom-lucene-analyzer/3923 "2018-12-18T14:22:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stefan.armbruster](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/stefan.armbruster/32/74_2.png) [@stefan.armbruster](https://community.neo4j.com/u/stefan.armbruster)\
**Post date:** [December 19, 2018, 12:50pm UTC](https://community.neo4j.com/t/how-to-add-custom-lucene-analyzer/3923/2 "2018-12-19T12:50:28Z")

</div>

Registration of custom analyzers is simple. Just create a java class extending `AnalyzerProvider` that provides the internal name and implementation of the custom analyzer.  
As an example take a look at [neo4j/Swedish.java at 3.5 · neo4j/neo4j · GitHub](https://github.com/neo4j/neo4j/blob/3.5/community/fulltext-index/src/main/java/org/neo4j/kernel/api/impl/fulltext/analyzer/providers/Swedish.java)

Note that the `@Service.Implementation` annotation might not work without some tweaks to your build system. Instead make sure you have a service loader file in place:  
`META-INF/services/org.neo4j.graphdb.index.fulltext.AnalyzerProvider` listing your analyzer provider classes and bundle this with your implementation into a jar file.  
That jar file needs to be dropped into neo4j's `/plugins` folder.

---

_[View the full topic](https://community.neo4j.com/t/how-to-add-custom-lucene-analyzer/3923)._
