One solution is to change the structure of your index. Index each of your items as individual Lucene documents.
Include with the document an additional field containing an invoice-id. This will allow you to use Lucene's search without difficulty, while also retaining the association between items and invoices. - Neal -----Original Message----- From: Sailesh [mailto:[email protected]] Sent: Thursday, April 07, 2011 6:20 AM To: [email protected] Subject: Searching a group of associated multi-value fileds Hi, I have scenario where i have so search multiple multi-valued fields, for example I have an invoice that contians may items and each item has many attributes like item id : 1, item_name : my item name1 , unit_price : 10 item id : 2, item_name : your item name2 , unit_price : 11 item id : 3, item_name : item name3 , unit_price : 12 The above items are part of single invoice, so cannot have them as separate documents. Now if I search for item-id = 2 and unit_price = 12 then it should not return me anything. If it would have been single I could have used phase or span queries but in case of multiple associated fields i don't how to handle it. So if any body have ever tried or have any idea to handle this problem, please let me know Thanks Sailesh -- View this message in context: http://lucene.472066.n3.nabble.com/Searching-a-group-of-associated-multi-value-fileds-tp2789957p2789957.html Sent from the Lucene - General mailing list archive at Nabble.com.
