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 index that as a non-
tokenized field. Querying for all documents under "/parent" is as
simple as a PrefixQuery.
Erik
On Jun 27, 2005, at 3:09 PM, Dan Funk wrote:
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 parentId=X) or a particular
topic, or a particular story.
Yousef Ourabi wrote:
Hello:
Thanks for all the help so far it has been fantastic. I have a
question on the document and field paradigm, this works great for
flat-files, like a word document, or web-page but what about nested
forums (ala slashdot) where in theory a specifc chat thread is nested
or is nested inside another chat thread. Is there a way to nest
lucene documents. IE Top level post in forum is one document, and any
branches off the main thred are nested inside that top level one? OR
is there a better mapping of lucene's paradigms to a slashdot like
forums paradigm?
Thanks for any help.
Best,
Yousef
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]