You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Pooja Verlani <po...@gmail.com> on 2010/01/18 04:44:04 UTC

Dynamic boosting of ids at search time

Hi,
I have to boost certain ids at the search time and these ids are not fixed,
so i can't keep them in DismaxRequest handler.
I mean, if for query x, ids to be boosted are 243452,346563,773567, then for
query y the ids to be boosted won't be the same. They are calculated at the
search time.
Also, I cant keep them in the lucene query as the list goes in thousands.
Please suggest a good resolution to it.

Thanks n Regards
Pooja

Re: Dynamic boosting of ids at search time

Posted by Lance Norskog <go...@gmail.com>.
http://www.lucidimagination.com/search/document/CDRG_ch04_4.4.4?q=ExternalFileField

This lets you make a file with a boost value for every document. You
can change the file and reload the new values with a <commit>. It
hasn't been materially changed since 2007 and there are no unit tests,
so it might not work.

On Sun, Jan 17, 2010 at 7:44 PM, Pooja Verlani <po...@gmail.com> wrote:
> Hi,
> I have to boost certain ids at the search time and these ids are not fixed,
> so i can't keep them in DismaxRequest handler.
> I mean, if for query x, ids to be boosted are 243452,346563,773567, then for
> query y the ids to be boosted won't be the same. They are calculated at the
> search time.
> Also, I cant keep them in the lucene query as the list goes in thousands.
> Please suggest a good resolution to it.
>
> Thanks n Regards
> Pooja
>



-- 
Lance Norskog
goksron@gmail.com

Re: Dynamic boosting of ids at search time

Posted by Chris Hostetter <ho...@fucit.org>.
: I mean, if for query x, ids to be boosted are 243452,346563,773567, then for
: query y the ids to be boosted won't be the same. They are calculated at the
: search time.
: Also, I cant keep them in the lucene query as the list goes in thousands.
: Please suggest a good resolution to it.

I'm at a loss here ... your first sentence seems to suggest that every 
unique request needs to specify a distinct list of IDs to give a bosted 
score too, but your second sentence clarifies that it's infeasible for you 
to include the IDs in the query.  that seems tantamount to saying 
"everytime i do a solr search, the rules about what is important change; 
but the rules are too long for me to tell solr what they are everytime i 
do a search." ... that's a catch-22.

My best suggestion based on what little i understand of the information 
you're provided is to suggest that perhaps you could write a custom plugin 
... either a RequestHandler, or a SearchComponent, or a QParser depending 
on what works best for your use cases ... where the client might be able 
to pass some "key" that can be used by the plugin to "look up" the list of 
IDs from some other data source and to build the query that way.

...but given how little i understnad about what it is you are trying to 
do, i suspect my best guess really isnt' a very good one.

Frankly, this is starting to smell like an XY Problem....

http://people.apache.org/~hossman/#xyproblem
XY Problem

Your question appears to be an "XY Problem" ... that is: you are dealing
with "X", you are assuming "Y" will help you, and you are asking about "Y"
without giving more details about the "X" so that we can understand the
full issue.  Perhaps the best solution doesn't involve "Y" at all?
See Also: http://www.perlmonks.org/index.pl?node_id=542341


-Hoss