lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhavin Pandya" <>
Subject ChainedFilter
Date Sat, 23 Sep 2006 06:36:47 GMT

I am using ChainedFilter and FilteredQuery together in order to remove RangeQuery from my
the problem is its not working..its effect is not returns me same number of record
whether i am including range or not.
Here is the snippet.

                    BooleanQuery bqone = "coming from parent function; it booleanQuery of
few termsQuery"
                    RangeFilter rf[] = new RangeFilter[2];
                    rf[0]=new RangeFilter("RANGEFIELD1", 20, 30 , true,true);
                    rf[1]=new RangeFilter("RANGEFIELD2", 20, 30 , true,true);
                    isChanged = true;

                    ChainedFilter cf = new ChainedFilter(rf,ChainedFilter.AND);
                    fq=new FilteredQuery(bqone,cf);
                    Hits hits =; 

Actually data is splitted across two columns ( RANGEFIELD1 and RANGEFIELD2 ) on which i want
to fire range. e.g give me all records which is between 20 and 30.
so i have created two filter and passed it to chainedfilter...
but its not working ...i dont know what i m missing.... is there any better way to implement

Bhavin pandya

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message