Package org.hibernate.search.query

Examples of org.hibernate.search.query.QueryHits


      if (searcher == null) {
         throw new NullPointerException("IndexSearcher instance is null.");
      }

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);
         int size = max - first + 1 < 0 ? 0 : max - first + 1;
         keyList = new ArrayList<Object>(size);
View Full Code Here


   public QueryIterator lazyIterator(int fetchSize) {
      IndexSearcher searcher = buildSearcher(searchFactory);

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);

         DocumentExtractor extractor = new DocumentExtractor(queryHits, searchFactory, indexProjection, idFieldNames, allowFieldSelectionInProjection);
View Full Code Here

      if (searcher == null) return Collections.EMPTY_LIST;


      try {

         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());

         int first = first();
         int max = max(first, queryHits.totalHits);

         int size = max - first + 1 < 0 ? 0 : max - first + 1;
View Full Code Here

   }

   private QueryHits getQueryHits(Searcher searcher, Integer n) throws IOException {
      org.apache.lucene.search.Query query = filterQueryByClasses(luceneQuery);
      buildFilters();
      QueryHits queryHits;
      if (n == null) { // try to make sure that we get the right amount of top docs
         queryHits = new QueryHits(searcher, query, filter, sort);
      } else {
         queryHits = new QueryHits(searcher, query, filter, sort, n);
      }
      resultSize = queryHits.totalHits;
      return queryHits;
   }
View Full Code Here

      if (searcher == null) {
         throw new NullPointerException("IndexSearcher instance is null.");
      }

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);
         int size = max - first + 1 < 0 ? 0 : max - first + 1;
         keyList = new ArrayList<Object>(size);
View Full Code Here

   public QueryIterator lazyIterator(int fetchSize) {
      IndexSearcher searcher = buildSearcher(searchFactory);

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);

         DocumentExtractor extractor = new DocumentExtractor(queryHits, searchFactory, indexProjection, idFieldNames, allowFieldSelectionInProjection);
View Full Code Here

      if (searcher == null) return Collections.EMPTY_LIST;


      try {

         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());

         int first = first();
         int max = max(first, queryHits.totalHits);

         int size = max - first + 1 < 0 ? 0 : max - first + 1;
View Full Code Here

   }

   private QueryHits getQueryHits(Searcher searcher, Integer n) throws IOException {
      org.apache.lucene.search.Query query = filterQueryByClasses(luceneQuery);
      buildFilters();
      QueryHits queryHits;
      if (n == null) { // try to make sure that we get the right amount of top docs
         queryHits = new QueryHits(searcher, query, filter, sort);
      } else {
         queryHits = new QueryHits(searcher, query, filter, sort, n);
      }
      resultSize = queryHits.totalHits;
      return queryHits;
   }
View Full Code Here

      if (searcher == null) {
         throw new NullPointerException("IndexSearcher instance is null.");
      }

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);
         int size = max - first + 1 < 0 ? 0 : max - first + 1;
         keyList = new ArrayList<Object>(size);
View Full Code Here

   public QueryIterator lazyIterator(int fetchSize) {
      IndexSearcher searcher = buildSearcher(searchFactory);

      try {
         QueryHits queryHits = getQueryHits(searcher, calculateTopDocsRetrievalSize());
         int first = first();
         int max = max(first, queryHits.totalHits);

         DocumentExtractor extractor = new DocumentExtractor(queryHits, searchFactory, indexProjection, idFieldNames, allowFieldSelectionInProjection);
View Full Code Here

TOP

Related Classes of org.hibernate.search.query.QueryHits

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.