Hello all! I solved my problem by short-circuting the filter part of the query and adding my checks during the getFilteredScorer method of my extended org.apache.lucene.search.FilteredQuery class. In here, the documents referenced are part of the results set and I can add my post search filtering during this step. I am certain there is a better way, but this one does work.
Thanks for the help getting me here. Jim Nolan On Fri, Jul 13, 2012 at 4:02 PM, James Nolan <nolansolrlistse...@gmail.com>wrote: > Thanks for the heads up. > > I was using org.apache.lucene.search.FilteredQuery which says it applies a > filter to an executed query. I instantiate (sorry if my lexicon is off) a > FilteredQuery and pass my filter and the boolean query to the constructor. > What I think should happen is that the FilteredQuery applies a filter to > the results of the BooleanQuery. If this isn't happening, do you know of > any ways to apply a filter or query to the results of another query, > preferably the boolean query as it is comprised of multiple term and range > queries that I want to post-filter. > > Thanks again, > > Jim Nolan > > > On Fri, Jul 13, 2012 at 1:32 PM, Uwe Schindler <u...@thetaphi.de> wrote: > >> The Filter and the BooleanQuery are handled separately and only merged >> later. IndexReaders passed to Filter don't know anything about the >> executed >> Query, so you always see a view on the complete index. >> >> ----- >> Uwe Schindler >> H.-H.-Meier-Allee 63, D-28213 Bremen >> http://www.thetaphi.de >> eMail: u...@thetaphi.de >> >> >> > -----Original Message----- >> > From: James Nolan [mailto:nolansolrlistse...@gmail.com] >> > Sent: Friday, July 13, 2012 7:26 PM >> > To: java-user@lucene.apache.org >> > Subject: FilteredQuery returning entire index >> > >> > Hello All! >> > >> > I'm trying to run a FilteredQuery over a BooleanQuery full of term and >> range >> > queries. In my custom filter, in the getDocSet method, the indexReader >> > contains the entire index segment. My understanding was that this >> > indexReader would only contain results from my nested boolean query. >> > Am I missing something here? >> > >> > Thanks, >> > >> > Jim Nolan >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> >