: You will need to get SolrIndexSearcher.java and modify following:-
: 
: public static final int GET_SCORES             =       0x01;

No.  Do not do that.  There is no reason for anyone, to EVER modify that 
line of code. Absolutely NONE!!!!  

If you've made that change to your version of Solr, pelase start a new 
thread on solr-user explaining your goal, and what things you tried before 
ultimately amking that change, because i garuntee you that if you are 
willing to modify java files to change that line, there will be a more 
general purpose reusable way to solve your goal besides that (which won't 
silently break alot of other functionality)

: > No, I don't wish to put a custom Similarity.  Rather, I want an
: > equivalent of HitCollector where I can bypass the scoring altogether.
: > And I prefer to do it by changing the configuration.

...there is no pure configuration way to obtain the same logic you could 
get from a custom HitCollector.  You haven't elaborated on what exactly 
your HitCollector looked like, but so far you've mentioned that it 
ignored the scores, and used the FieldCache to get a field value w/o 
dealing with stored fields -- you can achieve something roughly 
functionally similar by writing a custom RequestHandler that uses 
SolrIndexSearcher.getDocSet (which skips scoring and sorting) and then 
iterate over that DocSet and fetch the values you want from the 
FieldCache.

or you could write a RequestHandler that uses your HitCollector as is -- 
but then you aren't really leveraging any value from Solr at all, the 
previous suggestion has the value add of utilizing Solr's filterCache for 
frequent queries (which can be really handy if your queries can be 
easily broken apart into pieces and dealt with using DocSet 
union/intersection operations -- like q/fq are dealt with in 
SearchHandler) 


-Hoss

Reply via email to