Re: Syntax question

2015-12-30 Thread Alan Woodward
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

Re: Syntax question

2015-12-30 Thread Erick Erickson
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

Syntax question

2015-12-30 Thread Brian V Zayas
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

Re: how to do simple search paging results of 100 each? and query syntax question

2011-07-14 Thread Sanne Grinovero
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

2011-06-19 Thread Hiller, Dean x66079
: 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

Re: how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Simon Willnauer
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

RE: how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Hiller, Dean x66079
@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

Re: how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Simon Willnauer
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

how to do simple search paging results of 100 each? and query syntax question

2011-06-19 Thread Hiller, Dean x66079
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

Re: query syntax question

2007-05-10 Thread Erick Erickson
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

Re: query syntax question

2007-05-10 Thread Les Fletcher
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

Re: query syntax question

2007-05-10 Thread markharw00d
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"/>

Re: query syntax question

2007-05-10 Thread Erick Erickson
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.

Re: query syntax question

2007-05-10 Thread Les Fletcher
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

Re: query syntax question

2007-05-10 Thread Les Fletcher
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

Re: query syntax question

2007-05-10 Thread Erick Erickson
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

query syntax question

2007-05-10 Thread Les Fletcher
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