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
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.
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
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
: 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
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);
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
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
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