Package net.fp.rp.search.mid.feedback

Examples of net.fp.rp.search.mid.feedback.SearchFeedback


        try {
            //store the query as feedback information only if the feedback is allow
            if (feedbackAllow) {
                try {
                    //store the feedback data
                    final SearchFeedback advice = new SearchFeedback(score,
                            somethingToSearch);
                 
                    if(PluginManager.getFeedbackDataStores()!=null){
                         PluginManager.getFeedbackDataStores().save(advice);
                    }
View Full Code Here


                                                .getObject().toString();

                        logger.debug("Feedback search is " + searchquery + "/" +
                            score);

                        return new SearchFeedback(Integer.valueOf(score)
                                                         .intValue(),
                            searchquery);
                    } else if (type.equalsIgnoreCase(
                                BaseFeedback.TYPE_DOCUMENT_FEEDBACK)) {
                        String score = node.getProperty(RP.score).getObject()
View Full Code Here

                node.addProperty(RP.type, advice.getType());
                node.addProperty(RP.date, advice.getDate());

                //save the feedback data
                if (advice instanceof SearchFeedback) {
                    SearchFeedback feedback = (SearchFeedback) advice;

                    node.addProperty(RP.score,
                        String.valueOf(feedback.getScore()));
                    node.addProperty(RP.searchquery, feedback.getFeedbackQuery());
                    //node.addProperty(RP.issearch, "true");
                } else if (advice instanceof DocumentFeedback) {
                    DocumentFeedback feedback = (DocumentFeedback) advice;
                    node.addProperty(RP.score,
                        String.valueOf(feedback.getScore()));
                    node.addProperty(RP.documentID, feedback.getDocumentID());
                    node.addProperty(RP.categoryName, feedback.getCategoryName());
                    node.addProperty(RP.summary, feedback.getSummary());
                } else if (advice instanceof CategoryFeedback) {
                    CategoryFeedback feedback = (CategoryFeedback) advice;
                    node.addProperty(RP.score,
                        String.valueOf(feedback.getScore()));
                    node.addProperty(RP.categoryName, feedback.getCategoryName());
                    node.addProperty(RP.categoryLocation,
                        feedback.getCategoryLocation());
                }

                //write the model
                model.write(new FileOutputStream(file));
                model.close();
View Full Code Here

TOP

Related Classes of net.fp.rp.search.mid.feedback.SearchFeedback

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.