Hi All,
       i used to search 3 Lucene Index store of size 6 GB,10 GB,10 GB of
records using MultiReader class.

here is the following code snippet:


     
                                         Directory indexDir2 = 
                      FSDirectory.getDirectory(indexSourceDir02,false);
                                         IndexReader indexSource2 =
IndexReader.open(indexDir2);
                                       Directory indexDir3 = 
                                            
FSDirectory.getDirectory(indexSourceDir03,false);
                                         IndexReader indexSource3 =
IndexReader.open(indexDir3);
                                         Directory indexDir4 = 
                                            
FSDirectory.getDirectory(indexSourceDir04,false);
                                         IndexReader indexSource4 =
IndexReader.open(indexDir4); 
                                        
           
                                         
        IndexReader[] readArray = {indexSource2,indexSource3,indexSource4};
        //merged reader
        IndexReader mergedReader = new MultiReader(readArray);
        IndexSearcher is = new IndexSearcher(mergedReader);
        
                                
                                 QueryParser parser = 
                                     new QueryParser("contents" ,new
StandardAnalyzer());
                                 
                                 
                                String searchQuery= 
                                       new
StringBuffer().append(inputNo).append(" AND dateSc:["
).append(fromDate).append(" TO ").append(toDate).append("]").append("
").append("AND").append(" ").append(callTyp).toString();
                                   
                                 
                                 
                                 Query callDetailquery =
parser.parse(searchQuery);
                                 
                                 hits = is.search(callDetailquery); 


it takes 300 MB of RAM for every search and it is very very slow is there
any other way to control the Memory and to make search faster.i use
SINGLETON  to use the IndexSearcher as a one time used object for all the
instances.
-- 
View this message in context: 
http://www.nabble.com/Java-Heap-Space--Out-Of-Memory-Error-tf4376803.html#a12475468
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to