RE: Tuning Solr caches with high commit rates (NRT)

2010-09-30 Thread Bruce Ritchie
> One strategy that I like, but haven't found in discussion lists is
> auto-limiting cache size/warming based on available resources (similar
> to the way file system caches use free memory). This would allow
> caches to adjust to their memory environment as indexes grow.

I've written such a cache for use as a Voldemort store in the past. I'm going 
to rewrite it in the near future to improve the code however the general idea 
can be seen at http://code.google.com/p/project-voldemort/issues/detail?id=225

The trickiest part of doing an auto-limiting cache based on available memory
is making sure that it works nicely with the garbage collector. Getting that 
balance right so that the gc doesn't churn needlessly took me more time than 
writing the cache.

Bruce 


RE: Using the more like this feature in solrj.

2008-10-08 Thread Bruce Ritchie
Erik,

I just got this to work myself and the documentation was only partially helpful 
in figuring it out. Two main points on making this work via sor1j:

#1 - Define the mlt handles in solrconfig.xml (it's not defined in the example 
solrconfig.xml I was using):



#2 - with Solrj, access the mlt handler via something similar to the following:

query.setQueryType("/" + MoreLikeThisParams.MLT);
query.set(MoreLikeThisParams.MATCH_INCLUDE, false);
query.set(MoreLikeThisParams.MIN_DOC_FREQ, 1);
query.set(MoreLikeThisParams.MIN_TERM_FREQ, 1);
query.set(MoreLikeThisParams.SIMILARITY_FIELDS, "subject,body");
query.setQuery("Your query here or in my case the unique key field:value");

Note that the two lines:

query.set(MoreLikeThisParams.MIN_DOC_FREQ, 1);
query.set(MoreLikeThisParams.MIN_TERM_FREQ, 1);

seem to be required for mlt to work - not sure why. Also, the fields that you 
use to determine similarity should be stored with termVectors=true and 
stored=true.


All the best,

Bruce Ritchie


-Original Message-
From: Erik Holstad [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2008 9:46 PM
To: solr-user@lucene.apache.org
Subject: Using the more like this feature in solrj.

Hi!
Have been going though the documentation for the more like this/these feature 
but haven't found anything about how to use it in Solrj.

Regards Erik

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.173 / Virus Database: 270.7.6/1715 - Release Date: 10/8/2008 7:19 
PM