I have finished importing 10,000,000 docments into Lucene 2.0 .
Every document includes journalTitle and articleTitle both of which should be sortable, so I add other two fields : journalTitle_sort and articleTitle_sort both of which use un_tokenized option for indexer. When I query by "journaltitle:advertising" and sort by journaltitle_sort, it 's ok for return "total result num is 28684" But when I use the same query and change sort field from journaltitle_sort to articleTitle_sort, java.lang.OutOfMemoryError happens. Then I try set JVM options to "-Xmx2048m", it also do take affect, java.lang.OutOfMemoryError happens too. I think maybe lucene preload all unique sortable field vlaue into memory, but my articleTitle_sort has too large different values because of un_tokenized option. Who can help me? Thanks!