Re: Wildcard Terms and total word or phrase count

2015-11-29 Thread Michael Wilkowski
It is because your index does not contain term quar* and this statistics function is not a query (you have to pass exact form of the term). To count terms that meet search criteria you may run search query with custom collector and count results. Or use normal search query returning TopDocs and jus

RE: Wildcard Terms and total word or phrase count

2015-11-29 Thread Kunzman, Douglas *
Everyone - Thanks for getting back to me. Unfortunately, in the sample code even when I pass a term with no wild cards and it is a string with multiple instances in my document the totalHitCount is never more than one. Does anyone have any ideas what I could be doing wrong? Thanks, Doug ---

Re: Wildcard Terms and total word or phrase count

2015-11-29 Thread Jack Krupansky
You didn't post your code that creates the index. Make sure you are using a tokenized TextField rather than a single-token StringField. -- Jack Krupansky On Fri, Nov 27, 2015 at 4:06 PM, Kunzman, Douglas * < douglas.kunz...@fda.hhs.gov> wrote: > Hi - > > This is my first Lucene project, my other

RE: Wildcard Terms and total word or phrase count

2015-11-29 Thread Kunzman, Douglas *
Jack - Thanks a lot for taking the time to try and answer my question. From using Solr I knew that it needed to be a TextField. I'm including the entire unit tester as an attachment. Thanks, Doug -Original Message- From: Jack Krupansky [mailto:jack.krupan...@gmail.com] Sent: S

Re: Determine whether a MatchAllQuery or a Query with atleast one Term

2015-11-29 Thread Sandeep Khanzode
Hi Uwe, Thanks. Actually, I do use that logic in another part of the code for some other functionality :). However, I was wondering if we have some direct API to check for the presence of terms (Terms, NumericRanges, etc.) given an abstract query. My requirement is simple: Irrespective of the Qu

Re: Determine whether a MatchAllQuery or a Query with atleast one Term

2015-11-29 Thread Trejkaz
On Mon, Nov 30, 2015 at 4:15 PM, Sandeep Khanzode wrote: > I want to check whether the net effect of this query (bool or otherwise) is a > MatchAllQuery (i.e. without > any terms) or a query with at least one term, or numeric range. Or both. *:* OR field:text The net effect is a MatchAllQu

Re: Wildcard Terms and total word or phrase count

2015-11-29 Thread Michael Wilkowski
Hi Doug, your attachment is not available (likely security settings). Please put it in github or somewhere else and provide a link to download. MW On Mon, Nov 30, 2015 at 2:29 AM, Kunzman, Douglas * < douglas.kunz...@fda.hhs.gov> wrote: > > Jack - > > Thanks a lot for taking the time to try and