lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Customizing the search result
Date Fri, 23 Dec 2016 04:01:21 GMT
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,

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


On Thu, Dec 22, 2016 at 6:58 PM, Daisy <> 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 → 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.
> ----------------------
> 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.

View raw message