+Priyanka Tufchi Hello Kumaran
We are using version 4.1 we have passed 1900 document and set paging 1900 we are expecting score of 1900 but we are getting only 1400 records in ScoreDoc[] hits So where are remaining 500 records .? should we consider it no matched ? and 900 records have matchIndex 0 what should we consider it? No Match. Hope you will get it more clear now. sample code is below --------------------------------- String QueryStr = query; // return array list of ranked result StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_41); // 1. create the index Directory index = new RAMDirectory(); IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_41, analyzer); IndexWriter w = new IndexWriter(index, config); int counter = 0; // define array of field name which s active int arrIndex = 0; ///add near 1900 document using while while (counter < lstDocBean.size()) { String criteria=lstDocBean.getCriteria(); String docID=lstDocBean.getDocID(); Document doc = new Document(); doc.add(new TextField("DocID", docID, shouldStore.YES)); doc.add(new TextField("Criteria", criteria, shouldStore.YES)); w.addDocument(doc); counter++; } w.close(); // here add weight in query // here write file write code // Query queryparser = new QueryParser(Version.LUCENE_41, "", // analyzer).parse(QueryParser.escape(QueryStr)); Query queryparser = new MultiFieldQueryParser(Version.LUCENE_41, "Criteria", analyzer).parse(QueryParser.escape(QueryStr)); int hitsperpage = 1900; IndexReader reader = IndexReader.open(index); IndexSearcher searcher = new IndexSearcher(reader); TopScoreDocCollector collector = TopScoreDocCollector.create( hitsperpage, true); searcher.search(queryparser, collector); ScoreDoc[] hits = collector.topDocs().scoreDocs; // refineLuceneTextSearch(Requirement, hits, searcher, ReqId); // old code //Display for (int i = 0; i < hits.length; ++i) { int docId = hits[i].doc; // Document d = searcher.doc(docId); String name1 = d.get(DocID + ""); system.out.println("DocID"+) } On Fri, Jul 18, 2014 at 11:45 PM, Kumaran R <kums....@gmail.com> wrote: > Provide some more information like lucene version, sample code, > parameters involved in indexing and searching. > > -- > Kumaran R > > > On 18-Jul-2014, at 6:52 pm, Priyanka Tufchi < > priyanka.tuf...@launchship.com> wrote: > > > > Hi All > > > > I am matching and ranking two set of Docs using apache lucene and I > passes > > page hits 1000. But in the result it shows 200 only why? > > > > It means that rest 800 are not matched and if so then what we should > > consider if we are getting 0.00 score for any match . > > > > Waiting for reply > > > > Thanks > > Priyanka > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >