how to use BNF

2006-07-16 Thread James liu
i wanna use "+","-","and","or","not" "*"

RE: MultiField Query

2006-07-16 Thread Rod.Madden
> I can think of two ways to do what you want, one with a parsed query and one without. With a parsed query: > Query q = QueryParser.parse("+field1:silly +(field2:example field3:example)", > "field1", new StopAnalyzer()); When I try this ( using Lucene 2.0 API ) I g

Re: MultiField Query

2006-07-16 Thread Michael D. Curtin
[EMAIL PROTECTED] wrote: I am using Lucene 2.0 and trying to use the MultiFieldQueryParser in my search. I want to limit my search to documents which have "silly" in "field1" ...within that subset of documents, I want documents which have "example" in "field2" OR "field3" The code fragment b

RE: Date ranges - getting the approach right

2006-07-16 Thread Chris Hostetter
: The second approach requires three hits, doesn't it? : : (1) TermQuery on start date + sort on document ID : (2) TermQuery on end date + reverse sort on document ID : (3) The actual query with a filter on the above You wouldn't need 3 queries for each date range you wanted to precompute, you cou

RE: Date ranges - getting the approach right

2006-07-16 Thread Rob Staveley (Tom)
The second approach requires three hits, doesn't it? (1) TermQuery on start date + sort on document ID (2) TermQuery on end date + reverse sort on document ID (3) The actual query with a filter on the above Would that really be a saving? -Original Message- From: Erick Erickson [mailto:[E

Improving Lucene Reader Instanciation time

2006-07-16 Thread Tom Gissel
I'm a lucene neophyte, so please forgive the simplicity of the my question. I've been playing around with Lucene and have noticed that the instantiation of my IndexReader is taking long time using the following code: Directory directory = FSDirectory.getDirectory(this.indexDir, fal

MultiField Query

2006-07-16 Thread Rod.Madden
I am using Lucene 2.0 and trying to use the MultiFieldQueryParser in my search. I want to limit my search to documents which have "silly" in "field1" ...within that subset of documents, I want documents which have "example" in "field2" OR "field3" The code fragment below is my attempt at this

Re: Hits syncronization

2006-07-16 Thread karl wettin
On 7/16/06, Mark Miller <[EMAIL PROTECTED]> wrote: Does the Hits class need to use a Vector for it's cache? Is the cache somehow shared among threads or should this be an ArrayList to avoid synchronization costs? Also, I do not see any backing array size initialization. Is this because the defaul

Hits syncronization

2006-07-16 Thread Mark Miller
Does the Hits class need to use a Vector for it's cache? Is the cache somehow shared among threads or should this be an ArrayList to avoid synchronization costs? Also, I do not see any backing array size initialization. Is this because the default of 10 is optimal? Am I wrong all over the place

Re: Searching on Multiple fields

2006-07-16 Thread Erick Erickson
You could always construct a BooleanQuery with all the necessary sub-clauses on an as-needed basis. You can string the sub-clauses together in arbitrarily complex ways. Be particularly aware that you one of the clauses of a BooleanQuery may itself be a boolean query, so constructing something like

Re: Date ranges - getting the approach right

2006-07-16 Thread Erick Erickson
Thanks for the clarification. Let me re-state this and see if I got it right. 1> if you never do any deletions (or recalculate your "special records" after deletion/optimization), this could work as-is. 2> the safe way to do this would be to find the miniminum doc ID for the start date, the maxi