Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Mark Leighton Fisher (4252)

Mark Leighton Fisher
  (email not shown publicly)

I am a Systems Engineer at Regenstrief Institute []. I also own Fisher's Creek Consulting [].
Friday July 16, 2010
11:09 AM

Stupid Lucene Tricks: Hierarchies

[ #40449 ]

You can search on hierarchies in Lucene if your hierarchy can be represented as a path enumeration (a Dewey-Decimal-like style of encoding a path, like "001.014.003" for the 3rd grandchild of the 14th child of the 1st branch).

For example, a search phrase like:


would return only the direct children of the 1st branch, while:


would return all descendents of the 1st branch.

  1. To get only the children of a particular node, you specify only that node, like:


  2. To get all of the descendents you specify everything that starts with that node:


  3. To get only the descendents after the children (grandchildren, etc.), you specify:


The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.