hi all:
our bussiness system generate some data,that information structrue like email 
message,one message have some attachments,so we can use email message to think 
of our data,I need index and search the message and its attachments,and when 
display hits,must display two kinds of links for every hit: one kind for 
message,and the other for attachments which match the query criteria,so the 
former kind there is only one link,but latter may be zero to n links.
one design may be as:for every message design one Lucene Document,it has a 
field to record its id,let's name the field id,an other field to correspond all 
its attachments,let's name the field attachments,afert that we also design a 
Lucene Document to correspond every message's every attachment,this Document 
has a field record its message's id,let's name the field messageid, so when 
query,we can retrieval messages may be itself's cotent or its attachments 
content match the query criteria,for generating links for attachments which 
match the query criteria,we can requey again,this time we can query only the 
message's attachments by adding a query condition that messageid=father query's 
messge id.it's obviously,there are two disadvantages: 1,it indexes attachments 
twice,one in message,and the other in Lucene Document for attachment.2,user's 
one query becomes 1+n query,1 for query message and its all attachments,n for 
requery the message's every attachments.is there any better solution? 


dazhi

Thanks for any hints!!!

Reply via email to