Home » » how to deal with Hierarchical Fields?lucene

how to deal with Hierarchical Fields?lucene

Hierarchical Fields


Using Hierarchical Fields

Original question from

  • URL: [WWW] http://issues.apache.org/eyebrowse/ReadMsg?listName=lucene-user@jakarta.apache.org&msgNo=7507

    Each document I index has an array of categories which looks like the following example....

    /Science/Medicine/Serology/blood gas


    Anyway, there's a couple things I'm trying to deal with.

    1- The fact that we have an undefined array size. I can't just shove
    these into a single field. I could explode them into multiple fields on
    the fly like category_1, category_2. etc. etc

    2- The fact that a search will need to be performed like "category:/Science/Medicine/*" would need to return all items within that category.


  • Note: Be careful of the analyzer you use.

Alternate answer


Popular Posts