Simply storing a parentId doesn't help query the hierarchy though -
for example, search for all "lucene" containing documents in a
specific forum thread, children and all.
One technique I've used to index hierarchy is to come up with a path
string such as "/parent/child/grandchild" and inde
You could have a parentId field in each document - which will give you a
nice hierarchy. You could also create a topicId (Linux, Microsoft,
etc...) and a storyId. At that point you can quickly identify the topic
and story for the message - and you can also search within a specific
thread (AND