# Not documented: how to get fulltext indexing not to drop hyphens (dashes)

**URL:** <https://community.neo4j.com/t/not-documented-how-to-get-fulltext-indexing-not-to-drop-hyphens-dashes/32009>\
**Category:** Documentation\
**Tags:** knowledge-base\
**Created:** [January 13, 2021, 7:54pm UTC](https://community.neo4j.com/t/not-documented-how-to-get-fulltext-indexing-not-to-drop-hyphens-dashes/32009 "2021-01-13T19:54:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![clem](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/clem/32/4364_2.png) [@clem](https://community.neo4j.com/u/clem)\
**Post date:** [January 13, 2021, 7:54pm UTC](https://community.neo4j.com/t/not-documented-how-to-get-fulltext-indexing-not-to-drop-hyphens-dashes/32009/1 "2021-01-13T19:54:58Z")

</div>

Full text indexing ([https://neo4j.com/docs/cypher-manual/current/administration/indexes-for-full-text-search/](https://neo4j.com/docs/cypher-manual/current/administration/indexes-for-full-text-search/) ) works well for me except the default **analyzer** strips hyphens from indexing.

Consider that the search for "_Emergency_" should not return "_Non-Emergency_". Product codes often have dashes in them too.

This is actually a lucene question/issue. I did find this:

> <https://stackoverflow.com/questions/10186675/lucene-index-problems-with-character>

So this works:

```auto
CALL db.index.fulltext.createNodeIndex("IndexName",["Label"],["property"], 
{ analyzer: "classic"}) // does not throw out hyphens, e.g. Non-Emergency is one word

```

This doesn't seem to be documented in the Neo4J documentation.

---

<div class="post-metadata">

**Author:** ![clem](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/clem/32/4364_2.png) [@clem](https://community.neo4j.com/u/clem)\
**Post date:** [February 17, 2021, 12:45am UTC](https://community.neo4j.com/t/not-documented-how-to-get-fulltext-indexing-not-to-drop-hyphens-dashes/32009/2 "2021-02-17T00:45:40Z")

</div>

Oops... I didn't actually try this out until just now. The ` 'classic'` Analyzer option doesn't do what the stackoverflow page claims.

`'whitespace'` sort of works except it won't split on other punctation marks (e.g. comma, period, etc."

Rat
