lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Regarding MoreLikeThis similarity Search
Date Fri, 18 Mar 2011 21:16:22 GMT

I am new to lucene ... I have a question while implementing similarity search using MoreLikeThis
query. I have written a small program but it is not giving any results. In my index file I
have both strored and unstored(analyzed) fields.  

Sample Code :

IndexReader ir = directory path);
	    		IndexSearcher indexsearcher = new ProfileIndexSearcher(ir);
	    		IndexSearcher indexsearcher = new IndexSearcher(ir);
		    	MoreLikeThis mlt = new MoreLikeThis(ir);
		    	Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_30);                    
		    	Query query1 =; //
		    	TopDocs matches = null;
		    	matches =,20); 

As per my understanding I should atleast one document as result. 

Is any one has idea what I can do to implement this serach.
Thanks in Advance.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message