Florin, I disclosure some details in the recent post http://blog.griddynamics.com/2015/08/scoring-join-party-in-solr-53.html. Let me know if you have further questions afterwards. I also notice that you use "obvious" syntax: BuyerID=83 but it's hardly ever possible. There is a good habit of debugQuery=true, which allows to reconcile query interpretation.
On Mon, Aug 31, 2015 at 2:40 PM, Florin Mandoc <flori...@mejix.com> wrote: > Hi, > > I am trying to model am index from a relational database and i have 3 main > entity types: products, buyers and sellers. > I am using nested documents for sellers and buyers, as i have many sellers > and many buyers for one product: > > { "Active" : "true", > "CategoryID" : 59, > "CategoryName" : "Produce", > "Id" : "227686", > "ManufacturerID" : 322, > "ManufacturerName" : "-------", > "Name" : "product name", > "ProductID" : "227686", > "SKU" : "DAFA2A1F047E438B8462667F987D80A5", > "ShortDescription" : "s description", > "type" : "product", > "UOM" : "Unit", > "UomSize" : "48", > "_childDocuments_" : [ { "BuyerID" : 83, > "DisplayOrder" : 0, > "ProductID" : "227686", > "id" : "227686_83", > "type" : "buyer" > }, > { "BuyerID" : 86, > "DisplayOrder" : 10, > "ProductID" : "227686", > "id" : "227686_86", > "type" : "buyer" > }, > { "BuyerID" : 83, > "ProductID" : "227686", > "SellerID" : 84, > "SellerName" : "Seller 84", > "id" : "227686_83_84", > "type" : "seller" > }, > { "BuyerID" : 83, > "ProductID" : "227686", > "SellerID" : 89, > "SellerName" : "Seller 89", > "id" : "227686_83_89", > "type" : "seller" > } > ], > "_version_" : 1509403723402575872 > } > > To query i use: > http://localhost:8983/solr/dine/select?q=Name:"product > name"&fq={!parent%20which=type:product v="type:buyer AND > BuyerID=83"}&wt=json&indent=true&fl=*,[child%20parentFilter=type:product%20childFilter=%22((type:buyer%20AND%20BuyerSiteID:83)%20OR%20(type:seller%20AND%20BuyerSiteID:83))]&rows=1000 > > and i get the product, buyer and sellers details, but i want to have the > products of BuyerID:83 sorted by DisplayOrder field. > > Is this possible to achieve this, and how? > > Thank you > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>