Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Ahmed El-dawy
Hello, My analyzer sometimes gives multiple terms for the same word. This makes them generated at the same position. When I use PhraseQuery to search for this term, it matches documents with all these terms at the same position (as if it is an AND). I want it to match documents with at least ONE

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Pierrick Brihaye
Hi Ahmed and all, Ahmed El-dawy wrote: Hello, My analyzer sometimes gives multiple terms for the same word. This makes them generated at the same position. When I use PhraseQuery to search for this term, it matches documents with all these terms at the same position (as if it is an AND). I wa

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Erik Hatcher
On 4 Nov 2005, at 03:53, Pierrick Brihaye wrote: Hi Ahmed and all, Ahmed El-dawy wrote: Hello, My analyzer sometimes gives multiple terms for the same word. This makes them generated at the same position. When I use PhraseQuery to search for this term, it matches documents with all these

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Daniel Naber
On Freitag 04 November 2005 11:33, Erik Hatcher wrote: > > This should have been fixed one year ago with Daniel and myself. > > Really?  It works in this OR kind of fashion with tokens in 0- > incremented positions? Yes, this test case shows it (multi will be turned into multi and multi2, both a

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Erik Hatcher
On 4 Nov 2005, at 13:45, Daniel Naber wrote: On Freitag 04 November 2005 11:33, Erik Hatcher wrote: This should have been fixed one year ago with Daniel and myself. Really? It works in this OR kind of fashion with tokens in 0- incremented positions? Yes, this test case shows it (multi

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Ahmed El-dawy
This is a source code that shows the problem I am talking about. In this example a new analyzer is made that outputs all words to the same position (all but the first one are positionIncrement=0). To get the problem I am talking about uncomment the only commented line. //---

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Chris Hostetter
your expected outcome differes from outcome you observe. This has the added bonus of serving as a easy to commit test case if there truely is a bug that needs fixed. : Date: Fri, 4 Nov 2005 23:35:55 +0200 : From: Ahmed El-dawy <[EMAIL PROTECTED]> : Reply-To: java-user@lucene.apache.org, [EMAIL P

Re: Multiple terms with the same position in PhraseQuery

2005-11-04 Thread Ahmed El-dawy
of course, is to write the code as a JUNit test that uses assertions > to demonstrate how your expected outcome differes from outcome you > observe. > This has the added bonus of serving as a easy to commit test case if there > truely is a bug that needs fixed. > > > : Date: F

Re: Multiple terms with the same position in PhraseQuery

2005-11-05 Thread Erik Hatcher
On 4 Nov 2005, at 23:08, Ahmed El-dawy wrote: BTW, I think there's a newer version of Lucene that I can't get, my version is 1.4.3 and I didn't find any newer version at the site. For example, the QueryParser in my version doesn't care with term position and I had to override it by myself to supp

Re: Multiple terms with the same position in PhraseQuery

2005-11-06 Thread Ahmed El-dawy
I have used the PhrasePrefixQuery but it has some problems. It sometimes throw an exception (OperationNotAllowed) when it is added to a boolean query with required flag set. Also it sometimes throws a null pointer exception and I don't know why. I am trying to get the latest version (from SVN) bu

Re: Multiple terms with the same position in PhraseQuery

2005-11-06 Thread Erik Hatcher
On 6 Nov 2005, at 16:13, Ahmed El-dawy wrote: I have used the PhrasePrefixQuery but it has some problems. It sometimes throw an exception (OperationNotAllowed) when it is added to a boolean query with required flag set. Also it sometimes throws a null pointer exception and I don't know why. I

Re: Multiple terms with the same position in PhraseQuery

2005-11-06 Thread Chris Hostetter
: : : Nothing Eclipse-specific that I've found, but this is the command- : line used in a shell: : : svn co http://svn.apache.org/repos/asf/lucene/java/trunk/ lucene I've never used eclipse, but a google search for "subversion eclipse" lis

Re: Multiple terms with the same position in PhraseQuery

2005-11-06 Thread Ken Krugler
I have used the PhrasePrefixQuery but it has some problems. It sometimes throw an exception (OperationNotAllowed) when it is added to a boolean query with required flag set. Also it sometimes throws a null pointer exception and I don't know why. I am trying to get the latest version (from SVN) b

Re: Multiple terms with the same position in PhraseQuery

2005-11-07 Thread Ahmed El-dawy
Thanks very much all of you I have just checked out the SVN version using SmartSVN and it worked very fine. I will investigate it more carefully as I can use new features in it. I see that PhrasePrefixQuery is becoming @deprecated. Good! It made many problems when I tried to use it. I have switched