Posts Tagged ‘analyzer’

Lucene by Example: Specifying Analyzers on a per-field-basis and writing a custom Analyzer/Tokenizer

Sunday, July 6th, 2014

Lucene is my favourite search engine library and the more often I use it in my projects the more features or functionality I find that were unknown to me.

Two of those features I’d like to share in the following tutorial is one the one hand the possibility to specify different analyzers on a per-field basis and on the other hand the API to create a simple character based tokenizer and analyzer within a few steps.

Finally we’re going to create a small index- and search application to test both features in a real scenario.

(more…)

Lucene Snippets: Index Stats

Saturday, September 8th, 2012

In Lucene 4.x there is an API to fetch index statistics for specific document’s fields.

The following examples shows how to create an index with some random documents and fetch some statistics for a field afterwards ..

(more…)

Lucene Snippets: Faceting Search

Tuesday, August 28th, 2012

The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets.

In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards ..

(more…)

Finding Memory Leaks using Eclipse and the MemoryAnalyzer Plugin

Wednesday, November 2nd, 2011

The MemoryAnalyzer Plugin for Eclipse allows us to quickly analyze heap dumps from a virtual machine and search for memory leaks. In the following tutorial we’re going to create and run a small application that is going to cause an OutOfMemoryException during its runtime.

In addition, we’re forcing the virtual machine to save a heap dump and finally analyzing this data using Eclipse and the MemoryAnalyzer plugin.

(more…)

Search
Categories