Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
On Wednesday 07 Dec 2005 22:23, Chris Hostetter wrote: ... > -- the real issue is that your query should matches a certain set of > documents, if there is a document you've added to the index that you > expect to see in that result but isn't there, then use Luke or > something like it to verify: >

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Chris Hostetter
: Unfortunately, my current test is a lot more convoluted than that (because : things are in layers). I will try and break it down like you have done into : a flat form and see were I get to, but its going to take a little time to do. : : I think one of the things I am doing is inserting and dele

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
On Wednesday 07 Dec 2005 21:33, Chris Hostetter wrote: > > Just doing a cut/paste inline is fine (the mailing list software doesn't > like most attachments). Here's an example of what you're talking about > that seems to work just fine for me... > > > public void sampleTest() throws Exception

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Chris Hostetter
: -ID:0 Category:Category1 Category:Category2 : : What I hope this says is : : "Give me all documents whose ID is not "0" AND which have a Category Field : which contains "Category1" or "Category2" That's what you've got. If it's not matching what you expect it to, then i'm guessing your index

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
On Wednesday 07 Dec 2005 19:00, Chris Hostetter wrote: > : In otherwords my BooleanQuery was more complex than I let on. > > I believe I understand what you are saying, but it's a little hard to make > sense of given teh corrections and lack of context -- it sounds like it > shoudl work. please pr

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Chris Hostetter
: In otherwords my BooleanQuery was more complex than I let on. I believe I understand what you are saying, but it's a little hard to make sense of given teh corrections and lack of context -- it sounds like it shoudl work. please print out query.toString() and make sure it looks like what you a

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
On Wednesday 07 Dec 2005 07:38, Alan Chandler wrote: > I am trying to construct, via individual query api, a query to search for > documents with a field name of "Category" and a value of either "Category1" > OR "Category2" (or both). > > My code to do this (given categories is the set of strings w

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Erik Hatcher
On Dec 7, 2005, at 9:56 AM, Alan Chandler wrote: Erik Hatcher writes: On Dec 7, 2005, at 7:06 AM, Alan Chandler wrote: Erik Hatcher writes: On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote: Worse than that, when I attempt to access Hits.doc(0) I am getting an immediate IOException with the

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
Erik Hatcher writes: ... or use IndexReader to navigate to it. That is something I wanted to ask about IndexReader.TermPositions(Term t) Returns an object which returns all occurrences of term. Is that what I use to find the actual position in my documents of the seach item? -- Alan

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
Erik Hatcher writes: On Dec 7, 2005, at 7:06 AM, Alan Chandler wrote: Erik Hatcher writes: On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote: Worse than that, when I attempt to access Hits.doc(0) I am getting an immediate IOException with the message "Bad file descriptor". I think ...

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Erik Hatcher
On Dec 7, 2005, at 7:06 AM, Alan Chandler wrote: Erik Hatcher writes: On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote: Worse than that, when I attempt to access Hits.doc(0) I am getting an immediate IOException with the message "Bad file descriptor". I think ... You must keep your Index

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Alan Chandler
Erik Hatcher writes: On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote: Worse than that, when I attempt to access Hits.doc(0) I am getting an immediate IOException with the message "Bad file descriptor". I think ... You must keep your IndexSearcher instance alive and well when working wi

Re: Confused about boolean query and how an IndexReader is associated with Hits

2005-12-07 Thread Erik Hatcher
On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote: Worse than that, when I attempt to access Hits.doc(0) I am getting an immediate IOException with the message "Bad file descriptor". I think this must be because by that time I have closed the indexSearcher (and therefore the Reader that sat b

Confused about boolean query and how an IndexReader is associated with Hits

2005-12-06 Thread Alan Chandler
I am trying to construct, via individual query api, a query to search for documents with a field name of "Category" and a value of either "Category1" OR "Category2" (or both). My code to do this (given categories is the set of strings with the category names I wish to search for) is as follows