I'm building a website for learning pruposes and i'm looking at lucene.net as a full text indexer for my content but I have some questions.
Lets say I have a hierarchy (n levels) of categories, and articles that are assigned to one category (1 cat -> n articles). Using a simple RDB would be very easy to search for an article under a category or any of it's subcategories. But i'm struggling to imagine how i'd build this kind of query using lucene. Options I think that might work:
Suposing that i'm idexing "title, text, category" for every article, one option would be to first get a list with the id's of every subcategory from the DB and then search in lucene with that list.
Other option would be to index the entire category "path" of the article inside a field in lucene. Something like "title", "text", "catparent1, catparent2, catparent3, category" ?
What's the best aproach when doing this kind of query with complex relational filters? (not just text search)