Have you looked at using groups? http://wiki.apache.org/solr/FieldCollapsing
In that design, your records will actually be 'availability' with UPC, merchantid, locationid (just one) and then you group on UPC? Did you see Guilt's presentation on something similar? http://www.slideshare.net/trenaman/personalized-search-on-the-largest-flash-sale-site-in-america Or look into bitsets where stores or maybe even merchants are encoded as bitsets: https://issues.apache.org/jira/browse/SOLR-1913 (not in Solr yet). Regards, Alex. Personal website: http://www.outerthoughts.com/ LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch - Time is the quality of nature that keeps events from happening all at once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) On Mon, Jan 27, 2014 at 4:47 PM, Utkarsh Sengar <utkarsh2...@gmail.com> wrote: > Bumping this one, with an update: > > After thinking about this, I think getting rid of lat/lon will simplify > things a bit, the new query pattern: > Input: keyword=ipod, merchantId=922,locationId=81,82 > Output: List of UPCs for ipod which exist inside stores 81 and 82 which > should be owned by 922 > > Also, based on some previous answers, flattening this one using dynamic > fields will create a lot of fields in my case - one field for every > merchantId and then I can use multivalued field to store locationId for > merchants. But is there a cleaner way of implementing this? > > Example: > upc,merchantid_922,merchantid_800 > 892828282,[82,82], > 922932932,,[22,23] > > > http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201208.mbox/%3CCAEFAe-Hew1CKk=EyqACFUTKqGHExXZLSHtyrgym09aYQVJf=t...@mail.gmail.com%3E > > > Thanks, > -Utkarsh > > > On Fri, Jan 24, 2014 at 12:05 PM, Utkarsh Sengar <utkarsh2...@gmail.com>wrote: > >> Hi guys, >> >> I have to load extra meta data to an existing collection. >> >> This is what I am looking for: >> For a UPC: Store availability by merchantId per location (which has >> lat/lon) >> >> My query pattern will be: Given a keyword, find all available products for >> a merchantId around the given lat/lon. >> >> Example: >> Input: keyword=ipod, merchantId=922,lat/lon=28.222,82.333 >> Output: List of UPCs which match the criteria >> >> So how should I go about doing it? Any suggestions? >> >> -- >> Thanks, >> -Utkarsh >> > > > > -- > Thanks, > -Utkarsh