Re: Solr cache when using custom scoring

2015-07-09 Thread amid
Mikhail,

We've now override the equal & hashcode of the custom query to use this new
param as well, and it works like charm.

Thanks allot,
Ami



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-cache-when-using-custom-scoring-tp4216419p4216496.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr cache when using custom scoring

2015-07-08 Thread amid
No sure I get you, the parameter is passed to solr as a string.
It seems like solr use for the caching key only the query, sort and range of
documents
(from the doc - "This cache holds the results of previous searches: ordered
lists of document IDs (DocList) based on a query, a sort, and the range of
documents requested")

Searching for a good way to make sure this parameter will be used as well so
different parameters values with the same query will create different cache
keys




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-cache-when-using-custom-scoring-tp4216419p4216479.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr cache when using custom scoring

2015-07-08 Thread Mikhail Khludnev
On Wed, Jul 8, 2015 at 11:30 PM, amid  wrote:

> The custom scoring code use a parameter which passed to the solr query,


this param should be evaluated in equals() and hashcode(). isn;t it?


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Solr cache when using custom scoring

2015-07-08 Thread amid
Hi,

We are using solr and implemented our own custom scoring.
The custom scoring code use a parameter which passed to the solr query,
different parameter value will change the score of the same query.

The problem which we have is that this parameter is not part of the query
caching so running the same query with different parameter values return the
first cached result.

What is the best way to workaround it (without removing the cache)? Is there
a way to tell solr to cache query with the parameter value as well? or maybe
add a dummy query to the query (the parameter is pretty long json)?

Thanks,
Ami



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-cache-when-using-custom-scoring-tp4216419.html
Sent from the Solr - User mailing list archive at Nabble.com.