Hi Brian,
You’d need to use a SpanNotQuery - something along these lines (schematically!):
SpanNotQuery(
SpanTermQuery(“privilege”),
SpanNearQuery(
SpanTermQuery(“privilege”),
SpanNearQuery(“received”, “this”, “email” … ),
4
I think you can come close with
NOT "received this e-mail in error privilege"~8
(or some other slop factor than 8)
This isn't quite what you're asking for as it would also exclude
docs with
"received privilege this e-mail error in"
in the field. Although i suppose
NOT "received this e-mail in e
Hello-
I'm trying to configure a search that captures a term but excludes search
results that contain that same term if the term only appears in proximity
to certain other terms. See the below example. I want to get search
results for emails that contain the word "privilege". But I don't wan
ne 19, 2011 1:48 PM
> To: Hiller, Dean x66079
> Cc: java-user@lucene.apache.org
> Subject: Re: how to do simple search paging results of 100 each? and query
> syntax question
>
> So do you need to score the documents or can they be in arbitrary order?
>
> On Sun, Jun 19, 2
: Re: how to do simple search paging results of 100 each? and query
syntax question
So do you need to score the documents or can they be in arbitrary order?
On Sun, Jun 19, 2011 at 8:45 PM, Hiller, Dean x66079
wrote:
> Hmmm, maybe I am using the wrong library?
>
> See the post I
onment that
> I need indexing on.
>
> Thanks,
> Dean
>
> -Original Message-
> From: Simon Willnauer [mailto:simon.willna...@googlemail.com]
> Sent: Sunday, June 19, 2011 11:48 AM
> To: java-user@lucene.apache.org
> Subject: Re: how to do simple search paging re
@lucene.apache.org
Subject: Re: how to do simple search paging results of 100 each? and query
syntax question
On Sun, Jun 19, 2011 at 7:29 PM, Hiller, Dean x66079
wrote:
> On the link
> http://lucene.apache.org/java/3_0_3/queryparsersyntax.html#Range%20Searches
>
>
> There is range
On Sun, Jun 19, 2011 at 7:29 PM, Hiller, Dean x66079
wrote:
> On the link
> http://lucene.apache.org/java/3_0_3/queryparsersyntax.html#Range%20Searches
>
>
> There is ranged searched, how do I specify everything above a date from date
> 20020101 to end of time?
here you can simply go for field
On the link
http://lucene.apache.org/java/3_0_3/queryparsersyntax.html#Range%20Searches
There is ranged searched, how do I specify everything above a date from date
20020101 to end of time?
Next, I am temporarily using lucene in a noSQL solution(to switch to Solr later
after prototype) and
I've thought about a flag field, and I see no reason why that wouldn't
work quite well, it all depends, I suppose, upon how ugly it would
eventually get
But about caching, what does making a filter have to do with Lucene
caching? Sure, there exist Lucene filter caching classes, but
there's no
Unfortuantely at the moment we don't make good use of lucene caching, so
the setting up of the filter on startup doesn't really work for us at
the moment. Maybe just a general flag field instead of a hasname field
would work better and be more general. You could just fill this field
with any
Here's a way to do it using the XML query parser in contrib
1) Create this query.xsl file (note use of cached double negative filter)
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
upperTerm="z"/>
I was going to suggest something about TermEnum/TermDocs, but
upon reflection that doesn't work so well because you have to
enumerate all the terms over all the docs for a field. Ouch.
But one could combine the two approaches. Don't index
any "special" values in your firstname or lastname fields.
Would a good solution be to insert a secret string into blank fields
that represents blank. That way you could search for:
firstname:(-Xd8fgrSjg) lastname:(-Xd8fgrSjg) some query string
Les
Les Fletcher wrote:
I like the idea of the filter since I am making heavy use of filters
for this par
I like the idea of the filter since I am making heavy use of filters for
this particular query, but how would one go about constructing it
efficiently at query time? All I can see is hacking around not being
able to use the * as the first character.
Les
Erick Erickson wrote:
You could crea
You could create a Lucene Filter that had a bit for each document that
had a first or last name and use that at query time to restrict your
results appropriately. You could create this at startup time or at
query time. See CachingWrapperFilter for a way to cache it.
Another approach would be to
I have a question about empty fields. I want to run a query that will
search against a few particular fields for the query term but then also
also check to see if a two other fields have any value at all. i.e., I
want to search for a set records but don't want to return a record if
that recor
17 matches
Mail list logo