public MultiColumnQueryHits executeQuery ( SessionImpl session , AbstractQueryImpl queryImpl , Query query , QPath [ ] orderProps , boolean [ ] orderSpecs , long resultFetchHint ) throws IOException , RepositoryException { waitForResuming ( ) ; checkOpen ( ) ; workingThreads . incrementAndGet ( ) ; try { FieldComparatorSource scs = queryImpl . isCaseInsensitiveOrder ( ) ? this . sics : this . scs ; Sort sort = new Sort ( createSortFields ( orderProps , orderSpecs , scs ) ) ; final IndexReader reader = getIndexReader ( queryImpl . needsSystemTree ( ) ) ; @ SuppressWarnings ( "resource" ) JcrIndexSearcher searcher = new JcrIndexSearcher ( session , reader , getContext ( ) . getItemStateManager ( ) ) ; searcher . setSimilarity ( getSimilarity ( ) ) ; return new FilterMultiColumnQueryHits ( searcher . execute ( query , sort , resultFetchHint , QueryImpl . DEFAULT_SELECTOR_NAME ) ) { @ Override public void close ( ) throws IOException { try { super . close ( ) ; } finally { PerQueryCache . getInstance ( ) . dispose ( ) ; Util . closeOrRelease ( reader ) ; } } } ; } finally { workingThreads . decrementAndGet ( ) ; if ( isSuspended . get ( ) && workingThreads . get ( ) == 0 ) { synchronized ( workingThreads ) { workingThreads . notifyAll ( ) ; } } } }
Executes the query on the search index .