Examples of Search


Examples of org.apache.nutch.webapp.common.Search

  public void nutchPerform(ComponentContext tileContext,
      HttpServletRequest request, HttpServletResponse response,
      ServletContext servletContext) throws ServletException, IOException {

    ServiceLocator locator = getServiceLocator(request);
    Search search;
   
    // key used for caching results, should really be something else but a part of user
    // definable String
    String key = request.getQueryString().replace("?","_").replace("&","_");
    StringBuffer cacheKey=new StringBuffer(key.length()*2);
 
View Full Code Here

Examples of org.apache.nutch.webapp.common.Search

      ServletContext servletContext)
      throws ServletException, IOException {

    ServiceLocator locator = getServiceLocator(request);

    Search search = locator.getSearch();
    search.launchSearch();
  }
View Full Code Here

Examples of org.apache.slide.search.Search

                                                          revisionDescriptor);
           
            Element basicSearch = getCheckoutSetQueryElement(resourcePath);
           
            String grammarNamespace = basicSearch.getNamespaceURI();
            Search searchHelper = nsaToken.getSearchHelper();
      // @FIXME Why is servletPath not required?
            SearchQuery searchQuery = searchHelper.createSearchQuery(grammarNamespace,
                                                                     basicSearch,
                                                                     sTokenNoEnlist,
                                                                     Integer.MAX_VALUE,
                                                                     contextPath);
           
            SearchQueryResult queryResult = searchHelper.search(sTokenNoEnlist, searchQuery);
            Iterator queryResultIterator = queryResult.iterator();
            RequestedResource requestedResource = null;
            Element href = null;
            while (queryResultIterator.hasNext()) {
                requestedResource = (RequestedResource)queryResultIterator.next();
View Full Code Here

Examples of org.bigbluebutton.webminer.search.Search

    LinkedHashMap<String, MatchVO> sortedMap = new LinkedHashMap<String, MatchVO>();
    Map<String, SessionHitsOrganizer> hitsOrganizerMap = new HashMap<String, SessionHitsOrganizer>();
    Map<String, String> resultMap = new HashMap<String, String>();

    synchronized (Index.getInstance()) {
      Search search = Search.getInstance();
      search.startSearch();
      TopDocs tps = null;
      Searcher searcher = null;
      ScoreDoc[] hits = null;
      if (bSortByScore){
        Search.TopDocCollectorSearchResult result = search.searchByScore(queryStr, startFrom, operator);
        TopDocCollector collector = result.getCollector();
        if (collector != null) {
          tps = collector.topDocs();
        }
        hits = tps.scoreDocs;
        searcher = result.getSearcher();
      } else {
        Search.TopFieldDocsSearchResult result = search.searchBySession(queryStr, startFrom, operator);
        TopFieldDocs tfd = result.getTopFieldDocs();
        if (tfd!=null){
          hits = tfd.scoreDocs;
       
        searcher = result.getSearcher();       
      }           
      if (hits == null) {
        if (logger.isInfoEnabled()) {
          logger.info("---No hit");
        }
      } else {       
       
        int start = startFrom;
        int end = hits.length;
        endIndex = end;
        if (logger.isInfoEnabled()) {
          logger.info("total match number="+endIndex);
        }       
        String currentSession="0";
        String lastSession="0";
       
       
        SessionHitsOrganizer hitsOrganizer = null;     
     
        for (int i = start; i < end; i++) {
          float score = hits[i].score;         
          Document doc = searcher.doc(hits[i].doc);         
          String path = doc.get("path");     
         
          if (path != null) {
            MatchVO matchVO = new MatchVO();
            matchVO.setFilePath(path);
            String fullContent = doc.get("title");
            String summary = getKeywordContext(queryStr, fullContent);
            matchVO.setContentSummary(summary);
           
            String fileName = doc.get("fileName");
            matchVO.setFileName(fileName);
            String indexSummary = doc.get("summary");
            matchVO.setIndexingSummary(indexSummary);
            matchVO.setScore(score);
            String title = indexSummary+": "+fileName+" (Match Score = "+score+")";
           
            //String content = doc.get("contents");               
           
            String allData=title+"%"+summary;
            if (doc.get("slideTime")!=null){
              allData += "%"+doc.get("slideTime");
              matchVO.setSlidePlayTime(doc.get("slideTime"));
            }
            //sortedMap.put(path, allData);
            sortedMap.put(path, matchVO);
           
            //model.put(path, newTitle+"%"+doc.get("summary")+"%"+doc.get("slideTime"));
            if (logger.isInfoEnabled()) {
              logger.info("----"+allData);
              logger.info((i + 1) + ". " + path);
            }

            if (title != null) {
              if (logger.isInfoEnabled()) {
                logger.info("   Title: " + doc.get("title"));
              }
            }
            if (bSmart){
              //Prepare for the grouping results           
              currentSession = getSessionNumberFromFileURL(path);
              //get existing current session organizer
              hitsOrganizer = hitsOrganizerMap.get(currentSession);
              if (hitsOrganizer==null){
                //create a new session organizer object
                hitsOrganizer = new SessionHitsOrganizer();
                hitsOrganizer.setSessionNum(currentSession);
                hitsOrganizerMap.put(currentSession, hitsOrganizer);
              }
              hitsOrganizer.setReleventRange((new Float(relRange)).floatValue());
              hitsOrganizer.addExactHits(path, score);
              matchVO.setSessionHitOrganier(hitsOrganizer);   
            }
           
          } else {
            System.out.println((i + 1) + ". "
                + "No path for this document");
          }
        }
       
      }
      search.finishSearch();
   
      //post processing for result grouping...     
      Iterator hitsOrganizerIt = hitsOrganizerMap.keySet().iterator();
      while (hitsOrganizerIt.hasNext()){
        String key = (String) hitsOrganizerIt.next();
View Full Code Here

Examples of org.boris.expr.function.excel.SEARCH

        assertEquals(eval(r, "Sale Price", 5), "Price");
        assertEquals(eval(r, "Stock Number"), "r");
    }

    public void testSEARCH() throws Exception {
        SEARCH s = new SEARCH();
        assertEquals(eval(s, "e", "Statements", 6), 7);
        assertEquals(eval(s, "margin", "Profit Margin"), 8);
    }
View Full Code Here

Examples of org.chinasb.framework.core.base.search.Search

  protected Class<T> persistentClass = (Class<T>) DAOUtil.getTypeArguments(GenericDAOImpl.class, this.getClass()).get(0);

  public int count(ISearch search) {
    if (search == null)
      search = new Search();
    return _count(persistentClass, search);
  }
View Full Code Here

Examples of org.chinasb.framework.core.base.search.Search

  protected Class<T> persistentClass = (Class<T>) DAOUtil.getTypeArguments(GenericDAOImpl.class, this.getClass()).get(0);

  public int count(ISearch search) {
    if (search == null)
      search = new Search();
    return _count(persistentClass, search);
  }
View Full Code Here

Examples of org.chinasb.framework.core.base.search.Search

    return _search(persistentClass, search);
  }

  public int count(ISearch search) {
    if (search == null)
      search = new Search();
    return _count(persistentClass, search);
  }
View Full Code Here

Examples of org.discogs.ws.search.Search

          result = DISCOGS.getRelease(query);
          break;
        case SEARCH_ARTISTS:
          List<Artist> artists = new LinkedList<Artist>();

          Search s = DISCOGS.search(Discogs.SEARCH_TYPE_ARTIST, query);

          List<SearchResult> srs = null;
          if (!s.getExactResults().isEmpty()) {
            srs = s.getExactResults();
          }
          else {
            srs = s.getSearchResults();
          }

          for (SearchResult sr : srs) {
            if (sr instanceof ArtistSearchResult) {
              try {
View Full Code Here

Examples of org.fcrepo.client.search.Search

    public static void setLastDir(File f) {
        s_lastDir = f;
    }

    protected void createSearchRepository() {
        Search frame = new Search();
        frame.setVisible(true);
        s_desktop.add(frame);
        try {
            frame.setSelected(true);
        } catch (java.beans.PropertyVetoException e) {
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.