Package net.fp.rp.search.plugins

Examples of net.fp.rp.search.plugins.ISearchResult


                                countTopDocs,true);
                        }

                        //gather the results from all the plugins
                        for (int i = 0; i < plugins.length; i++) {
                            ISearchResult result = plugins[i].getResults();

                            //iterate over all the documents
                            double sumGroup = 0;

                            //sum for all the direct score of the nodes found it in the same set 
                            for (int j = 0; j < result.getDocuments().size();
                                    j++) {
                                DocumStruct doc = (DocumStruct) result.getDocuments()
                                                                      .get(j);

                                sumGroup = sumGroup +
                                    PluginManager.getCategoryStores()
                                                 .getDirectScore(doc.getCategoryName(),
                                        doc.getId());
                            }

                            //calculate the average
                            double average = 0.0;

                            if (result.getDocuments().size() > 0) {
                                average = sumGroup / result.getDocuments().size();
                            }

                            //case of "term AND categoryname:X" and set of term < set of categoryname:X (1 category in the system)
                            //store the new average score for each document in the set
                            for (int j = 0; j < result.getDocuments().size();
                                    j++) {
                                DocumStruct doc = (DocumStruct) result.getDocuments()
                                                                      .get(j);

                                //create a new document set and it to the list
                                listLinks.add(new DocumSetStruct(
                                        doc.getCategoryName(), doc.getId(),
View Full Code Here


            int countErrors = 0;
            int countHits = 0;
            List allDocs = new ArrayList();

            for (int i = 0; i < plugins.length; i++) {
                ISearchResult result = plugins[i].getResults();
                countHits = countHits + result.getCountFound();
                countErrors = countErrors + result.getCountErrors();
                allDocs.addAll(result.getDocuments());
            }

            if (allDocs.size() > 0) {
                //we found documents (maybe with errors
                myModel.put(ModelView.STARTNO, "1");
View Full Code Here

TOP

Related Classes of net.fp.rp.search.plugins.ISearchResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.