Package com.ikanow.infinit.e.data_model.index

Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.doQuery()


        boolQuery.must(QueryBuilders.rangeQuery(DocumentPojo.created_).from(cleanseStartTime));
        boolQuery.must(QueryBuilders.termQuery(DocumentPojo.sourceKey_, sp.getKey() ));
        searchOptions.setSize(200); // (note this is multiplied by the number of primary shards)
        searchOptions.setSearchType(SearchType.SCAN);
        searchOptions.setScroll("10m");
        SearchResponse rsp = esm.doQuery(boolQuery, searchOptions);
        String scrollId = rsp.getScrollId();
        int nSkip = 0;
       
        for (;;) // Until no more hits
        {
View Full Code Here


          BoolQueryBuilder boolQueryOLD = QueryBuilders.boolQuery();
          boolQueryOLD.must(QueryBuilders.rangeQuery(DocumentPojo.created_).from(cleanseStartTime));
          boolQueryOLD.must(QueryBuilders.termQuery(DocumentPojo.sourceKey_, sp.getKey()));
          searchOptionsOLD.addSort(DocumentPojo.created_, SortOrder.ASC);
          searchOptionsOLD.setSize(rows);
          SearchResponse rspOLD = esm.doQuery(boolQueryOLD, searchOptionsOLD);
          SearchHit[] docsOLD = rspOLD.getHits().getHits();
         
          //Check all solr docs against mongodb
         
          for (SearchHit hit: docsOLD)        
View Full Code Here

    }
    //TESTED

    // Perform the search

    SearchResponse rsp = gazIndex.doQuery(queryObj, searchOptions);

    // Format the return values

    SearchHit[] docs = rsp.getHits().getHits();     
    DimensionListPojo dimlist = new DimensionListPojo();
View Full Code Here

      }
      else { // normal case
        searchOptions.setSize(nNumSuggestionsToReturn);
      }

      SearchResponse rsp = esm.doQuery(boolQuery, searchOptions);
      SearchHit[] docs = rsp.getHits().getHits();

      //Currently this code takes the results and puts
      //them into a set so there are no duplicates
      //duplicates occur for example when you search for
View Full Code Here

    searchSettings.addFields();
    if ((null != query.raw) && (null != query.raw.query))
    {
      // (Can bypass all other settings)       
      searchSettings.setQuery(query.raw.query);
      queryResults = indexMgr.doQuery(null, tempFilterInfo.parentFilterObj, searchSettings);
    }//TESTED '{ "raw": { "match_all": {} } }'
    else
    {
      // Where I can, use the source filter as part of the query so that
      // facets will apply to query+filter, not just filter
View Full Code Here

    {
      // Where I can, use the source filter as part of the query so that
      // facets will apply to query+filter, not just filter
      queryObj = QueryBuilders.boolQuery().must(queryObj).must(QueryBuilders.constantScoreQuery(tempFilterInfo.parentFilterObj).boost(0.0F));
     
      queryResults = indexMgr.doQuery(queryObj, null, searchSettings);
    }//TESTED '{}' etc
   
    long nLuceneTime = queryResults.getTookInMillis();

  // 0.7] Lucene scores 
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.