Re: Filter question

2023-11-21 Thread Mikhail Khludnev
Hi Trevor Well, you may negate it via qb.add(product_c_positive, Occur.MUST_NOT); it will work only if there is a sibling MUST/SHOULD clause. Regarding qb.add(BooleanQuery.Builder().add(product_c_positive, Occur.MUST_NOT).build(), Occur.FILTER); It may hardly work unless Lucene "adjusts pure neg

Filter question

2023-11-21 Thread Trevor Nicholls
Hi I'm constructing a BooleanQuery with an optional filter query and a mandatory content query, plus some optional boost queries. In effect, what I am doing is implementing this shorthand: BooleanQuery.Builder qb = new BooleanQuery.Builder(); if (filter) { qb.add(filterquery, Occur.

Re: Simple Filter-Question

2007-12-30 Thread Daniel Naber
On Sonntag, 30. Dezember 2007, Dominik Bruhn wrote: > I know this is the wrong approach and that the right solution should be > a Filter. But I dont know which filter to use and how. The simplest approach is probably to wrap your limiting query with this class: http://lucene.apache.org/java/2_2

Simple Filter-Question

2007-12-29 Thread Dominik Bruhn
Hy, I got a Integerfield for each of my documents which tells me out of which area of my documentbase this document is. So 1 is "Research Theme 1", 2 is "Research Theme 2", 3 is "Documentation Projekt 21" and so on. Uppon searching I want to have only documents from areas the user is allowed to lo

Re: Filter question

2006-12-09 Thread Chris Hostetter
: That works fine if there are some criteria in filterQuery and query. : But sometimes, the bean I'm passing in will not pass any criteria into : the filterQuery part. If that's the case, cwf looks like this: : CachingWrapperFilter(QueryFilter()) ... : will result in no results. If there

Filter question

2006-12-08 Thread Van Nguyen
I have a query that uses a filter... looking something like this: BooleanQuery filterQuery = new BooleanQuery(); // add criteria QueryFilter qf = new QueryFilter(filterQuery); CachingWrapperFilter cwf = new CachingWrapperFilter(qf);

Re: Token Filter question

2005-08-19 Thread Paul Elschot
On Thursday 18 August 2005 21:51, Dan Armbrust wrote: > I am implementing a filter that will remove certain characters from the > tokens - thing like '(', etc - but the chars to be removed will be > customizable. > > This is what I have come up with - but it doesn't seem very efficient. > Is t

Re: Token Filter question

2005-08-18 Thread Erik Hatcher
On Aug 18, 2005, at 3:51 PM, Dan Armbrust wrote: I am implementing a filter that will remove certain characters from the tokens - thing like '(', etc - but the chars to be removed will be customizable. This is what I have come up with - but it doesn't seem very efficient. Is there a bette

Token Filter question

2005-08-18 Thread Dan Armbrust
I am implementing a filter that will remove certain characters from the tokens - thing like '(', etc - but the chars to be removed will be customizable. This is what I have come up with - but it doesn't seem very efficient. Is there a better way? Should I be adjusting the token endOffset when