Examples of SearchQuery


Examples of ch.entwine.weblounge.common.content.SearchQuery

    } catch (Throwable t) {
      throw new IllegalStateException("Unable to instantiate class " + handlerClass + ": " + t.getMessage(), t);
    }

    SearchResult searchResult;
    SearchQuery q = new SearchQueryImpl(site);
    q.withTypes(MovieResource.TYPE);
    q.sortByPublishingDate(Order.Descending);
    q.withPublisher(harvesterUser);
    try {
      searchResult = contentRepository.find(q);
    } catch (ContentRepositoryException e) {
      logger.error("Error searching for resources with harvester publisher.");
      throw new RuntimeException(e);
View Full Code Here

Examples of com.bluetangstudio.searchcloud.client.model.SearchQuery

     * Builds the SearchQuery and return it.
     *
     * @return the SearchQuery
     * */   
    public final SearchQuery build() {
        return new SearchQuery(queries, queryConstraints, pagination);
    }
View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.search.SearchQuery

        if(parameter == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "SimpleObject", this.getClass().getName()));
        }

        SearchQuery searchQuery = (SearchQuery)parameter;

        // check for mandatory fields
        String query = searchQuery.getQuery();
        if(query == null){
            query = "";
        }

        MultiParameter multiParameter = new MultiParameter();
        multiParameter.addParameter(query);

        ArrayList<String> listOfFilters = new ArrayList<String>();
        if(!searchQuery.isOnAll()){
            if(searchQuery.isOnTickets()) listOfFilters.add(SearchKeys.ON_TICKETS);
            if(searchQuery.isOnChangesets()) listOfFilters.add(SearchKeys.ON_CHANGESETS);
            if(searchQuery.isOnMilestones()) listOfFilters.add(SearchKeys.ON_MILESTONES);
            if(searchQuery.isOnWiki()) listOfFilters.add(SearchKeys.ON_WIKI);

            multiParameter.addParameter(Utils.fillVectorFromArrayList(listOfFilters));
        }

        return multiParameter;
View Full Code Here

Examples of io.druid.query.search.search.SearchQuery

  }

  @Test
  public void testFullOnSearch()
  {
    SearchQuery query = Druids.newSearchQueryBuilder()
                              .dataSource(dataSource)
                              .granularity(allGran)
                              .intervals(fullOnInterval)
                              .query("a")
                              .build();
View Full Code Here

Examples of it.unibz.instasearch.indexing.SearchQuery

    InstaSearchView searchView = InstaSearchUI.showSearchView();
   
    if( searchView != null ) {
      int maxResults = SearchQuery.UNLIMITED_RESULTS;
      searchString += convertFilterToString(filter);
      SearchQuery searchQuery = new SearchQuery(searchString, maxResults);
      searchQuery.setExact( similarSearch.getSelection() );
      searchQuery.setFilter(null); // put filters in search string instead
     
      searchView.setSearchString(searchString); // to display
      searchView.search(searchQuery, false);
    }
   
View Full Code Here

Examples of javax.help.search.SearchQuery

    if (queries == null) {
        continue;
    }
    for (Enumeration e = queries.elements();
         e.hasMoreElements(); ) {
        SearchQuery query = (SearchQuery) e.nextElement();
        if (query.isActive()) {
      debug ("queries are active waiting to stop");
      queriesActive = true;
        }
    }
    if (queriesActive) {
View Full Code Here

Examples of net.fp.rp.search.back.search.SearchQuery

                    //ignore the terms (conjuction:AND, OR) )
                    if ((!term.equalsIgnoreCase("and")) &&
                            (!term.equalsIgnoreCase("or"))) {
                        //construct the search query for the term
                        SearchQuery queryForm = new SearchQuery(term);

                        //for all the plugins invoke the search process
                        for (int i = 0; i < plugins.length; i++) {
                            //find the documents that contain the specified token ordered by direct score
                            plugins[i].doSearch(queryForm,
View Full Code Here

Examples of net.fp.rp.search.back.search.SearchQuery

                }
            }

            IInterestedInSearch[] plugins = PluginManager.getInterestedInSearch();
            log.debug("Number of plugins able to carry out search:"+plugins.length);
            SearchQuery query = new SearchQuery(somethingToSearch);

            //do the search
            for (int i = 0; i < plugins.length; i++) {
                plugins[i].doSearch(query, DocumStruct.FIELD_SORT_SCORE, true,
                    searchCount,useThreading);
            }

            //wait till all the search plugins are done or time out was reached
            if(useThreading){
               boolean wait = true;
                 log.debug(
                     "Wait for plugin to finish the search operation (plugins are ready or time expired)");

                 while (wait && !Util.isTimeExpired(start, maxWaitSearchTime)) {
                     wait = false;

                     for (int i = 0; i < plugins.length; i++) {
                         if (!plugins[i].isReady()) {
                             wait = true;
                         }
                     }
                 }
            }
          

            //iterate on the plugins and gather the result:startno,endno,list of documents found it, search query)
            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");
                myModel.put(ModelView.ENDNO, String.valueOf(allDocs.size()));
                myModel.put(ModelView.DOCUMENTSNO,
                    String.valueOf(allDocs.size()));
                myModel.put(ModelView.DOCUMENTS, allDocs);
                myModel.put(ModelView.ERROR, "false");

                float elapsedTimeMillis = (System.currentTimeMillis() - start) / 1000F;
                myModel.put(ModelView.SEARCHTIME,
                    String.valueOf(elapsedTimeMillis));

                if (countErrors == 0) {
                    myModel.put(ModelView.STATUS,
                        MessageUtil.getMessage("app.search.status.noerror"));
                } else {
                    myModel.put(ModelView.STATUS,
                        MessageUtil.getMessage("app.search.status.errors",
                            new Object[] { String.valueOf(countErrors) }));
                }
            } else {
                //no document was found it
                log.debug("No pages were found containing " +
                    query.getQuery());
                myModel.put(ModelView.ERROR, "true");
                myModel.put(ModelView.STATUS,
                    MessageUtil.getMessage("app.search.status.nopage",
                        new Object[] { query.getQuery() }));
            }
        } catch (RpException e) {
            log.warn("Exception in search " + e.getMessage(), e);

            myModel.put(ModelView.ERROR, "true");
View Full Code Here

Examples of net.opentsdb.search.SearchQuery

   
    // the uri will be /api/vX/search/<type> or /api/search/<type>
    final String[] uri = query.explodeAPIPath();
    final String endpoint = uri.length > 1 ? uri[1] : "";
    final SearchType type;
    final SearchQuery search_query;
   
    try {
      type = SearchQuery.parseSearchType(endpoint);
    } catch (IllegalArgumentException e) {
      throw new BadRequestException("Invalid search query type supplied", e);
    }
   
    if (query.hasContent()) {
      search_query = query.serializer().parseSearchQueryV1();
    } else {
      search_query = parseQueryString(query);
    }
   
    search_query.setType(type);
   
    try {
      final SearchQuery results =
        tsdb.executeSearch(search_query).joinUninterruptibly();
      query.sendReply(query.serializer().formatSearchResultsV1(results));
    } catch (IllegalStateException e) {
      throw new BadRequestException("Searching is not enabled", e);
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.james.mailbox.SearchQuery

   


    @Test
    public void testBodyShouldMatchPhraseInBody() throws Exception {
        SearchQuery query = new SearchQuery();
        query.andCriteria(SearchQuery.bodyContains(CUSTARD));
        Iterator<Long> result = index.search(null, mailbox3, query);
        assertEquals(10L, result.next().longValue());
        assertFalse(result.hasNext());
       
       
        query = new SearchQuery();
        query.andCriteria(SearchQuery.bodyContains(CUSTARD + CUSTARD));
        result = index.search(null, mailbox3, query);
        assertFalse(result.hasNext());
    }
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.