Assume I have a list of objects that look like this:
class AuctionItem
{
string Name {get;set;}
byte[] Image {get;set;}
}
and I want to store them in a Lucene Document
like so:
foreach(var auctionItem in AuctionItems)
{
doc.Add(new Field("Name", ... ) );
doc.Add(new Field("Image", ... ) );
}
When querying the index, I want to ensure that I get one or more documents back where the Name field is grouped together with the Image field since the Name is related to the Image.
Is there a way to do this with Lucene?