Hanlp Lucene Plugin
HanLP-based Chinese tokenizer for Lucene and Solr search engines
If you run a Lucene/Solr stack and need top-tier Chinese segmentation, this is the most capable plugin available. Setup is straightforward for experienced Solr users, but documentation is sparse and support is community-only. For teams without Solr expertise, consider a cloud-based NLP API instead.
- Search engineers building Chinese-language search engines with Solr/Lucene
- Developers needing domain-specific Chinese tokenization with custom dictionaries
- Organizations using Solr for e-commerce or content search requiring accurate segmentation
- Non-Lucene based search systems (e.g., Elasticsearch without adapters)
- Users seeking out-of-the-box cloud-hosted tokenization
- Applications requiring real-time online API—this is an offline plugin
We scan live Reddit threads, YouTube comments, X posts, G2 reviews and other communities — and hand you an honest verdict in under a minute.
- Honest verdict, not marketing
- Real pros & cons from real users
- Attributed quotes with receipts
3 free scans · no card needed
Skip Hanlp Lucene Plugin if you are not using Apache Lucene or Solr, or if you prefer a cloud-hosted NLP API with managed updates.
No official support or maintenance; you must rely on community forums and GitHub issues for troubleshooting.
Free and open-source, making it ideal for budget-constrained teams already using Solr. Competitors like IK Analyzer are also free, but HanLP offers more NLP depth. No hidden tiers or usage limits.
In short
Hanlp Lucene Plugin — HanLP-based Chinese tokenizer for Lucene and Solr search engines. Best for Search engineers building Chinese-language search engines with Solr/Lucene, Developers needing domain-specific Chinese tokenization with custom dictionaries, Organizations using Solr for e-commerce or content search requiring accurate segmentation. Free to use.
Viability Score
How likely is Hanlp Lucene Plugin to still be operational in 12 months? Based on 4 signals — momentum (how recently it shipped), wrapper dependency, revenue model, and web presence.
Last calculated: July 2026
How we score →Key Features
- Standard Chinese word segmentation mode
- NLP mode with part-of-speech tagging
- Index mode for full segmentation of long words
- Custom dictionary support for domain terms
- Named entity recognition (person, location, etc.)
- Index-time and query-time segmentation
- Solr schema configuration via schema.xml
- Lucene TokenizerFactory integration
- Supports HanLP's updated models
- Thread-safe and high-throughput analysis
- Supports Solr5.x and Lucene5.x
- Stop word filtering via Solr filters
- Synonym support via Solr SynonymFilterFactory
About Hanlp Lucene Plugin
Hanlp Lucene Plugin integrates HanLP's advanced Chinese natural language processing into Apache Lucene and Solr, providing precise Chinese word segmentation for full-text search. Designed for Java developers and search engineers, it replaces default tokenizers with HanLP's context-aware segmentation, supporting both indexing and query analysis. The plugin works by intercepting Lucene's analysis pipeline, applying HanLP's dictionary-based and statistical models to break Chinese text into meaningful tokens. It supports multiple segmentation modes including a standard mode and an index mode that performs full segmentation of long words for better recall. Named entity recognition and custom dictionaries are available, making it suitable for domain-specific search applications. What sets it apart is its tight integration with Lucene/Solr without requiring code changes—configure via XML or API. It leverages HanLP's updated models and offers community support, though no official commercial backing. Ideal for e-commerce, legal, or academic search where Chinese language nuances matter. Compared to alternatives like IK Analyzer or Jieba, Hanlp Lucene Plugin offers deeper NLP capabilities (NER, POS tagging) and better context-aware segmentation, reducing false matches like "商品和服务" vs "和服".
Behind the Verdict
Hanlp Lucene Plugin fills a specific but important niche: improving Chinese text search in Lucene/Solr environments. Its strength lies in leveraging HanLP's robust NLP capabilities, including named entity recognition and custom dictionaries, which outperform simpler tokenizers like IK Analyzer for domain-specific content. However, the plugin is a community project with no official support, and documentation is limited to the original blog post and GitHub. Updates may lag behind HanLP's mainline releases. For search engineers comfortable with Solr configuration, it's a powerful tool; for others, the learning curve and maintenance burden may outweigh benefits.
Researching Hanlp Lucene Plugin? Get your full AI stack in 60 seconds.
Free, no signup — tell us your goal and get tools matched to your budget & existing stack.
Real-world workflow fit
Concrete scenarios for the personas Hanlp Lucene Plugin actually fits — and what changes day-one when you adopt it.
You need to index a catalog of Chinese product names and descriptions in Solr, ensuring accurate segmentation for terms like '手机壳' and '连衣裙'.
Outcome: Configure schema.xml to use HanLPTokenizerFactory with index mode for indexing and standard mode for querying. Upload product data and verify search returns relevant results with high precision.
Your Solr-based search must recognize legal terms like '知识产权' and '合同法' as single tokens.
Outcome: Add a custom domain-specific dictionary to HanLP, configure the plugin in schema.xml, and index legal documents. Users find documents faster with accurate term recognition.
You need to search across Chinese titles and abstracts in Solr, but default tokenizers break compound terms like '机器学习'.
Outcome: Deploy the plugin with HanLP's standard model. The index mode ensures good recall for long phrases, and query mode provides relevant results without over-segmentation.
Use Cases
- Index Chinese product catalogs with accurate segmentation for e-commerce search
- Enable precise legal document retrieval by recognizing specialized terms
- Improve search relevance in academic journals by segmenting Chinese titles and abstracts
- Integrate with Solr to power multilingual search across Chinese and English content
Models Under the Hood
as of 2026-07-06
Limitations
- Lacks active commercial support and updates may lag behind HanLP's mainline.
- Requires manual Solr configuration.
- Does not provide an API service—only works within Lucene/Solr contexts.
as of 2026-07-06
Where the pricing makes sense
The company stage and team size where Hanlp Lucene Plugin's pricing actually pencils out — and where peers do it cheaper.
Free and open-source, making it ideal for budget-constrained teams already using Solr. Competitors like IK Analyzer are also free, but HanLP offers more NLP depth. No hidden tiers or usage limits.
Setup time & first value
How long it actually takes to get something useful out of Hanlp Lucene Plugin — broken out by persona, not the marketing-page minute.
For a Solr expert, setup takes about 30 minutes: download jars, place them in the webapp lib, modify schema.xml, and start Solr. For newcomers, expect 1-2 hours including reading the documentation and troubleshooting.
Switching to or from Hanlp Lucene Plugin
How to bring data in from common predecessors and how to get it back out — written for the switcher, not the buyer.
- →From IK Analyzer: Replace IK's tokenizer config in schema.xml with HanLPTokenizerFactory and ensure HanLP jars are in the classpath.
- ↗To Elasticsearch with HanLP plugin: Reindex data using Elasticsearch's HanLP analysis plugin, as the Solr plugin is not directly compatible.
Integrations
Resources & Guides
Official links
Featured Head-to-Head Comparisons
Popular in Code & Development
Temporal AI
Durable execution platform for building reliable AI agents and workflows.
Spider Cloud
Fast web crawling, scraping & search API for AI agents
Frequently Asked Questions
Used Hanlp Lucene Plugin? Help shape our editorial sentiment research.