On Mon, Nov 24, 2008 at 6:26 PM, souravm <[EMAIL PROTECTED]> wrote: > I have indexed data of size around 20GB. My JVM memory is 1.5GB. > > For this data if I do a query with sort flag on (for a single field) I always > get java out of memory exception even if the number of hit is 0. With no > sorting (or default sorting with score) the query works perfectly fine.` > > I can understand that JVM heap size can max out when the number of records > hit is high, but why this is happening even when number of records hit is 0 ? > > The same query with sort flag on does not give me problem till 1.5 GB of data. > > Any explanation ?
Sorting in lucene and solr uninverts the field and creates a FieldCache entry the first time the sort is used. How many documents are in your index, and what is the type of the field you are sorting on? -Yonik