extractterms is currently the only query-independent means of introspecting queries but it only reveals a list of terms for that query - not the boosts each individual term in that query may or may not have . `` container '' queries such as booleanquery should be unwrapped to get at the boost info held in each child element . some discussion around this topic here : http://www.gossamer-threads.com/lists/lucene/java-dev/34208?search_string=introspection;#34208 unfortunately there seemed to be limited interest in requiring all query objects to implement something common which would allow access to child queries so what follows here are query-specific implementations for accessing embedded query elements . concode_field_sep IndexSearcher EMPTY_INDEXSEARCHER concode_field_sep WeightedTerm[] getIdfWeightedTerms concode_elem_sep WeightedTerm[] getTerms concode_elem_sep WeightedTerm[] getTerms concode_elem_sep WeightedTerm[] getTerms concode_elem_sep void getTerms
void function ( BooleanQuery arg0 , float arg1 , HashSet < WeightedTerm > arg2 , boolean arg3 , String arg4 ) { for ( BooleanClause loc0 : arg0 ) { if ( arg3 || loc0 . getOccur ( ) != BooleanClause . Occur . MUST_NOT ) getTerms ( loc0 . getQuery ( ) , arg1 , arg2 , arg3 , arg4 ) ; } }