Thanks a lot for the response.
What I would like to do is something similar to groupby function. But because 
of some performance issue and business requirement limitation, I rather don't 
want to use groupby. 

Our business requirement is to avoid one supplier is dominating the search 
result page. 50 out of 80 products are belong to one supplier. 
I understand that this issue can be solved by groupby function.

1. I did check the query time and groupby takes a little bit longer time 
compare to without groupby query.
2. Another business limitation is: Our page needs 80 products to display from 
different suppliers per keyword search. We have some of the search keywords 
which only have less than 80 suppliers. If we use groupby(supplier), the 80 
products per page is not possible anymore.


-----Original Message-----
From: Erick Erickson [mailto:erickerick...@gmail.com] 
Sent: Friday, December 23, 2016 12:01 PM
To: solr-user
Subject: Re: Customizing the search result

My very, very, very first question is "why do you think you have to develop 
your own customized re-ranking?". How have you determined that your needs 
aren't satisfied out-of-the-box? What I'm going for here is wondering if this 
is an XY problem. You're asking how to do X because you think that will 
accomplish Y, without stating what the task (Y) is. It'll save you a LOT of 
work if you don't have to create (and
maintain) your own.

That said, maybe you _do_ have to extend BaseSimilarity. But there's a lot 
built in to Solr so before going there let's see if there's an easier solution.

For instance, there's the ReRankingQParserPlugin that takes the output from the 
main clause and pushes it through a completely independent Solr query that at 
least sounds similar to what you want to do. There is boosting, altering the 
score by function queries, etc. etc, etc.....

For <2> what you probaby want is a search component, which is pluggable. These 
are chained together in your request handler and you can add a 
<last-components> entry and get the packet to be returned just before it's 
sent. It will contain all the data to be returned, the docs (rows worth), the 
facets, groups, all that stuff.

But again, why do you want to do this? There are also DocTransformers that can 
be used to munge the individual documents coming back that you can configure 
rather than code fresh. They may not actually do what you need but before 
writing your own let's see if maybe there's an easier way to do what you want 
than extending org.apache.solr.response.transform.DocTransformer and creating a 
plugin..

Best,
Erick

On Thu, Dec 22, 2016 at 6:58 PM, Daisy <daisy...@globalsources.com> wrote:
> I’m really new to SOLR and excuse me if my question is vague.
>
> I found some of the search related things in solr-core → 
> org.apache.solr.search package. I’m not sure this is the right package to 
> look into.
>
>
>
> 1.       I would like to know if we are going to develop our own customized 
> re-ranking, where and how can we add the new codes?
>
> 2.       Which class is the final step before returning the result from Solr? 
> For e.g. “<result maxScore="9.452013" name="response" numFound="17343" 
> start="0">”
>
> Thank you.
>
>
> ----------------------
> CONFIDENTIALITY NOTICE
>
> This e-mail (including any attachments) may contain confidential and/or 
> privileged information. If you are not the intended recipient or have 
> received this e-mail in error, please inform the sender immediately and 
> delete this e-mail (including any attachments) from your computer, and you 
> must not use, disclose to anyone else or copy this e-mail (including any 
> attachments), whether in whole or in part.
>
> This e-mail and any reply to it may be monitored for security, legal, 
> regulatory compliance and/or other appropriate reasons.
>


----------------------
CONFIDENTIALITY NOTICE 

This e-mail (including any attachments) may contain confidential and/or 
privileged information. If you are not the intended recipient or have received 
this e-mail in error, please inform the sender immediately and delete this 
e-mail (including any attachments) from your computer, and you must not use, 
disclose to anyone else or copy this e-mail (including any attachments), 
whether in whole or in part. 

This e-mail and any reply to it may be monitored for security, legal, 
regulatory compliance and/or other appropriate reasons.

Reply via email to