Re: minimum occurances of term in document

2007-08-31 Thread Jed Reynolds
Mike Klaas wrote: On 30-Aug-07, at 4:01 PM, Chris Hostetter wrote: You could accomplish the goal without any coding by using phrase queries: calico calico calico~1 will match only documents that have at least three occurrences of calico. If this is performant enough, you are done.

minimum occurances of term in document

2007-08-30 Thread Jed Reynolds
Apologies if this is in the Lucene FAQ, but I was looking thru the Lucene syntax and I just didn't see it. Is there a way to search for documents that have a certain number of occurrences of a term in the document? Like, I want to find all documents that have the term Calico mentioned three

Re: minimum occurances of term in document

2007-08-30 Thread Jed Reynolds
Jed Reynolds wrote: Apologies if this is in the Lucene FAQ, but I was looking thru the Lucene syntax and I just didn't see it. Is there a way to search for documents that have a certain number of occurrences of a term in the document? Like, I want to find all documents that have the term

Re: minimum occurances of term in document

2007-08-30 Thread Mike Klaas
On 30-Aug-07, at 1:22 PM, Jed Reynolds wrote: Jed Reynolds wrote: Apologies if this is in the Lucene FAQ, but I was looking thru the Lucene syntax and I just didn't see it. Is there a way to search for documents that have a certain number of occurrences of a term in the document? Like,

Re: minimum occurances of term in document

2007-08-30 Thread Mike Klaas
On 30-Aug-07, at 3:30 PM, Chris Hostetter wrote: One way would be to create your own Query subclass (similar to TermQuery) that returned a score of zero for docs below a certain tf threshold. This is minor clarification: a score of zero is still a match ... the key to writting custom

Re: minimum occurances of term in document

2007-08-30 Thread Chris Hostetter
You could accomplish the goal without any coding by using phrase queries: calico calico calico~1 will match only documents that have at least three occurrences of calico. If this is performant enough, you are done. Otherwise, you'll have to do some custom coding. I'll be searching

Re: minimum occurances of term in document

2007-08-30 Thread Mike Klaas
On 30-Aug-07, at 4:01 PM, Chris Hostetter wrote: You could accomplish the goal without any coding by using phrase queries: calico calico calico~1 will match only documents that have at least three occurrences of calico. If this is performant enough, you are done. Otherwise, you'll