Nasseam Elkarra schrieb:

I am storing items in an index. Each item has a comma separated list
of related items. Is it possible to bring back an item and all of its
related items in one query? If so how and how would you distinguish
between which one is the main item and which are the related.

Think about the data structure. You're saying there is a main item,
which suggests there is some regularity to the underlying data
structure, possibly a tree.

If there is a main item, each item should store a reference to the main
item. You could then perform a lookup specifying q=mainitem:12345. That
would retrieve all items related to 12345 and solve the problem more
efficiently than having each item store a list of all its related items.

I'm thinking of small or moderately sized trees here, such as they grow
in mailing lists or discussion boards.

If it's not a tree, but some less regular graph, then the notion of a
"main item" needs clarification.

Michael Ludwig

Reply via email to