Package org.hibernate.search.engine

Examples of org.hibernate.search.engine.DocumentExtractor.extract()


      int size = max - first + 1 < 0 ? 0 : max - first + 1;
      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor( searchFactoryImplementor, indexProjection );
      for (int index = first; index <= max; index++) {
        //TODO use indexSearcher.getIndexReader().document( hits.id(index), FieldSelector(indexProjection) );
        infos.add( extractor.extract( hits, index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      return new IteratorImpl( infos, loader );
    }
    catch (IOException e) {
View Full Code Here


      int size = max - first + 1 < 0 ? 0 : max - first + 1;
      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor( searchFactoryImplementor, indexProjection );
      for (int index = first; index <= max; index++) {
        infos.add( extractor.extract( hits, index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      List list = loader.load( infos.toArray( new EntityInfo[infos.size()] ) );
      if ( resultTransformer == null || loader instanceof ProjectionLoader) {
        //stay consistent with transformTuple which can only be executed during a projection
View Full Code Here

      DocumentExtractor extractor = new DocumentExtractor(
          queryHits, searchFactoryImplementor, indexProjection, idFieldNames, allowFieldSelectionInProjection
      );
      for ( int index = first; index <= max; index++ ) {
        //TODO use indexSearcher.getIndexReader().document( hits.id(index), FieldSelector(indexProjection) );
        infos.add( extractor.extract( index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      return new IteratorImpl( infos, loader );
    }
    catch ( IOException e ) {
View Full Code Here

      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor(
          queryHits, searchFactoryImplementor, indexProjection, idFieldNames, allowFieldSelectionInProjection
      );
      for ( int index = first; index <= max; index++ ) {
        infos.add( extractor.extract( index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      List list = loader.load( infos.toArray( new EntityInfo[infos.size()] ) );
      if ( resultTransformer == null || loader instanceof ProjectionLoader ) {
        //stay consistent with transformTuple which can only be executed during a projection
View Full Code Here

      DocumentExtractor extractor = new DocumentExtractor(
          queryHits, searchFactoryImplementor, indexProjection, idFieldNames, allowFieldSelectionInProjection
      );
      try {
        for ( int index = first; index <= max; index++ ) {
          infos.add( extractor.extract( index ) );
          //TODO should we measure on each extractor?
          if ( index % 10 == 0 ) timeoutManager.isTimedOut();
        }
      }
      catch ( QueryTimeoutException e ) {
View Full Code Here

      DocumentExtractor extractor = new DocumentExtractor(
          queryHits, searchFactoryImplementor, indexProjection, idFieldNames, allowFieldSelectionInProjection
      );
      try {
        for ( int index = first; index <= max; index++ ) {
          infos.add( extractor.extract( index ) );
          //TODO should we measure on each extractor?
          if ( index % 10 == 0 ) timeoutManager.isTimedOut();
        }
      }
      catch ( QueryTimeoutException e ) {
View Full Code Here

      int size = max - first + 1 < 0 ? 0 : max - first + 1;
      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor( queryAndHits.preparedQuery, searcher, searchFactoryImplementor, indexProjection );
      for (int index = first; index <= max; index++) {
        //TODO use indexSearcher.getIndexReader().document( hits.id(index), FieldSelector(indexProjection) );
        infos.add( extractor.extract( queryAndHits.hits, index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      return new IteratorImpl( infos, loader );
    }
    catch (IOException e) {
View Full Code Here

      int size = max - first + 1 < 0 ? 0 : max - first + 1;
      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor( queryAndHits.preparedQuery, searcher, searchFactoryImplementor, indexProjection );
      for (int index = first; index <= max; index++) {
        infos.add( extractor.extract( queryAndHits.hits, index ) );
      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      List list = loader.load( infos.toArray( new EntityInfo[infos.size()] ) );
      if ( resultTransformer == null || loader instanceof ProjectionLoader ) {
        //stay consistent with transformTuple which can only be executed during a projection
View Full Code Here

      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor(
          queryHits, searchFactoryImplementor, indexProjection, idFieldNames, allowFieldSelectionInProjection
      );
      for ( int index = first; index <= max; index++ ) {
        infos.add( extractor.extract( index ) );
      }
      Loader loader = getLoader();
      return new IteratorImpl( infos, loader );
    }
    catch ( IOException e ) {
View Full Code Here

      List<EntityInfo> infos = new ArrayList<EntityInfo>( size );
      DocumentExtractor extractor = new DocumentExtractor(
          queryHits, searchFactoryImplementor, indexProjection, idFieldNames, allowFieldSelectionInProjection
      );
      for ( int index = first; index <= max; index++ ) {
        infos.add( extractor.extract( index ) );
      }
      Loader loader = getLoader();
      List list = loader.load( infos.toArray( new EntityInfo[infos.size()] ) );
      if ( resultTransformer == null || loader instanceof ProjectionLoader ) {
        //stay consistent with transformTuple which can only be executed during a projection
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.