Add a phone number normalization TokenFilter [LUCENE-3663]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Phone numbers can be found in the wild in an infinity variety of formats (e.g. with spaces, parenthesis, dashes, with or without country code, with letters in substitution of numbers). So some Lucene applications can benefit of phone normalization with a TokenFilter that gets a phone number in any format, and outputs it in a standard format, using a default country to guess country code if it's not present.
---
Migrated from [LUCENE-3663](https://issues.apache.org/jira/browse/LUCENE-3663) by Santiago M. Mola, 2 votes, updated Jan 24 2012
Attachments: [PhoneFilter.java](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-3663/PhoneFilter.java) (versions: 2)
Contributor guide
Research direction
Start by reading the attached PhoneFilter.java and the Lucene TokenFilter APIs, then review the issue examples. Clarify the standard output format and default-country behavior before implementation; done means the filter handles separators, country codes, and letter substitutions consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100