Re: Sorting parent documents based on a field from children

2015-09-17 Thread Florin Mandoc
Great, thank you very much for your help. On 16.09.2015 13:07, Mikhail Khludnev wrote: On Wed, Sep 16, 2015 at 12:15 PM, Florin Mandoc wrote: Is possible to to also add "name_s:expensive" search term in q? I know i can add it to fq but I will have no score boost. Sure

Re: Sorting parent documents based on a field from children

2015-09-16 Thread Florin Mandoc
Hi, Sorry for letting this thread hanging, I was out of office last week. I have managed to make it work using this query: http://localhost:8983/solr/testscoring/select?q={!parent%20which=type_s:product%20score=max}+color_s:Red^=0%20AND%20{!func}price_i=json=true=score,*,[docid]=true for the

Re: Sorting parent documents based on a field from children

2015-09-16 Thread Mikhail Khludnev
On Wed, Sep 16, 2015 at 12:15 PM, Florin Mandoc wrote: > Is possible to to also add "name_s:expensive" search term in q? I know i > can add it to fq but I will have no score boost. Sure you can. But beware of query syntax trap. It's explained by David Smiley at comment

Re: Sorting parent documents based on a field from children

2015-09-01 Thread Florin Mandoc
Hi, I have tried the solution from your blog with my schema and with the example from the blog post, with solr-5.3.0 and with solr-5.4. 0-2015-08-12 and i get this error: "responseHeader":{ "status":500, "QTime":32}, "error":{ "msg":"child query must only match non-parent docs,

Re: Sorting parent documents based on a field from children

2015-09-01 Thread Mikhail Khludnev
I suspect URL encoding might mess with MUST (+) clause. Can you post debugQuery=true output to make sure that the query parsed right. Then make sure that chid query and parent filter are fully orthogonal. eg +type_s:product +color_s:Red returns no result. Last check to check, make sure that you

Re: Sorting parent documents based on a field from children

2015-09-01 Thread Alexandre Rafalovitch
On 1 September 2015 at 08:29, Mikhail Khludnev wrote: > Last check to check, make sure that you don't have deleted document in the > index for a while. You can check in at SolrAdmin. What's the significance of that particular advice? Is something in the join including

Re: Sorting parent documents based on a field from children

2015-09-01 Thread Alexandre Rafalovitch
On 1 September 2015 at 09:10, Mikhail Khludnev wrote: >> Not many >> people know about it, may help to disambiguate the syntax. >> > Oh. C'mon! it's announced for ages http://yonik.com/solr/query-syntax/ Not everybody reads and keeps track of every feature of Solr.

Re: Sorting parent documents based on a field from children

2015-09-01 Thread Mikhail Khludnev
On Tue, Sep 1, 2015 at 3:44 PM, Alexandre Rafalovitch wrote: > On 1 September 2015 at 08:29, Mikhail Khludnev > wrote: > > Last check to check, make sure that you don't have deleted document in > the > > index for a while. You can check in at

Sorting parent documents based on a field from children

2015-08-31 Thread Florin Mandoc
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" :

Re: Sorting parent documents based on a field from children

2015-08-31 Thread Mikhail Khludnev
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