Re: Zero hits for queries ending with a number

2004-04-03 Thread lucene
On Friday 02 April 2004 23:48, Erik Hatcher wrote: On Apr 2, 2004, at 10:00 AM, [EMAIL PROTECTED] wrote: On Saturday 13 March 2004 11:06, Otis Gospodnetic wrote: Field.Keyword is suitable for storing data like Url. Give that a try. I just tried this a minute ago and found that I cannot

Re: Simple date/range question

2004-04-03 Thread lucene
On Friday 02 April 2004 17:03, [EMAIL PROTECTED] wrote: date:[20030101 TO 20030202] [java] 11:05:53,735 ERROR [view.SearchAction] org.apache.lucene.queryParser.ParseException: Encountered 20030202 at line 1, column 18. [java] Was expecting: [java] ] ... Why is this?

Re: Zero hits for queries ending with a number

2004-04-03 Thread Erik Hatcher
On Apr 3, 2004, at 3:19 AM, [EMAIL PROTECTED] wrote: You *can* use wildcards with keywords (in fact, a keyword really has no meaning once indexed - everything is a term at that point). Well, I just tried. I also was surprised actually - but it just didn't work. I can use wildcards for

Re: Simple date/range question

2004-04-03 Thread Erik Hatcher
On Apr 3, 2004, at 4:07 AM, [EMAIL PROTECTED] wrote: On Friday 02 April 2004 17:03, [EMAIL PROTECTED] wrote: date:[20030101 TO 20030202] [java] 11:05:53,735 ERROR [view.SearchAction] org.apache.lucene.queryParser.ParseException: Encountered 20030202 at line 1, column 18. [java] Was

Re: Simple date/range question

2004-04-03 Thread lucene
On Saturday 03 April 2004 11:53, Erik Hatcher wrote: I didn't catch in your first message that it was throwing a ParseException this is odd. Are you certain that date:[20030101 TO 20030202] is the complete string your passing to QueryParser? Did Yes. you subclass QueryParser? If so,

Re: Zero hits for queries ending with a number

2004-04-03 Thread lucene
On Saturday 03 April 2004 11:48, Erik Hatcher wrote: Provide us the results of running your url through that, using the same SnowballAnalyzer(German2): Analzying http://www.yahoo.com/foo/bar.html; org.apache.lucene.analysis.WhitespaceAnalyzer:

Re: Zero hits for queries ending with a number

2004-04-03 Thread Erik Hatcher
Ok, we're getting somewhere now. So, where is the exception you encountered when using this utility code?! (i.e. it didn't thrown an exception, so something is different in your usage in your code). I tried this: Query query = MultiFieldQueryParser.parse(date:[20030101 TO 20030202], new

Re: Zero hits for queries ending with a number

2004-04-03 Thread lucene
On Saturday 03 April 2004 15:19, Erik Hatcher wrote: date:[20030101 TO 20030202] I found the/my bug. Since Lucene is case-sensitive, I do lower-case all queries for user's convenience. The ParseException is thrown because the TO becomes to. Well, I really think Lucene needs to daff such

Re: Zero hits for queries ending with a number

2004-04-03 Thread Erik Hatcher
On Apr 3, 2004, at 9:59 AM, [EMAIL PROTECTED] wrote: On Saturday 03 April 2004 15:19, Erik Hatcher wrote: date:[20030101 TO 20030202] I found the/my bug. Since Lucene is case-sensitive, I do lower-case all queries for user's convenience. The ParseException is thrown because the TO becomes to.

Re: Zero hits for queries ending with a number

2004-04-03 Thread lucene
On Saturday 03 April 2004 17:11, Erik Hatcher wrote: No objections that error messages and such could be made clearer. Patches welcome! Care to submit better error message handling in this case? Or perhaps allow lower-case to? I think the best would be if Lucene would simply have a

Re: Zero hits for queries ending with a number

2004-04-03 Thread Erik Hatcher
On Apr 3, 2004, at 10:34 AM, [EMAIL PROTECTED] wrote: I forgot that I did lower-case it. I fact I even output it in it's original state but lower-case it just before I pass it to lucene. That lower-casing is what I would call a hack and hence it's no surprise that I forgot it :-) But why even

Re: Zero hits for queries ending with a number

2004-04-03 Thread Tatu Saloranta
On Saturday 03 April 2004 08:34, [EMAIL PROTECTED] wrote: On Saturday 03 April 2004 17:11, Erik Hatcher wrote: No objections that error messages and such could be made clearer. Patches welcome! Care to submit better error message handling in this case? Or perhaps allow lower-case to? I

Re: Zero hits for queries ending with a number

2004-04-03 Thread Erik Hatcher
Extremely well said, Tatu! On Apr 3, 2004, at 11:24 AM, Tatu Saloranta wrote: On Saturday 03 April 2004 08:34, [EMAIL PROTECTED] wrote: On Saturday 03 April 2004 17:11, Erik Hatcher wrote: No objections that error messages and such could be made clearer. Patches welcome! Care to submit better

Re: Boolean Phrase Query question

2004-04-03 Thread Erik Hatcher
On Apr 3, 2004, at 12:13 PM, Ankur Goel wrote: Hi, I have to provide a functionality which provides search on both file name and contents of the file. For indexing I use the following code: org.apache.lucene.document.Document doc = new org.apache. lucene.document.Document();

RE: Boolean Phrase Query question

2004-04-03 Thread Ankur Goel
Thanks Eric for the solution. I have to filename field as I have to give the end user facility to search on File Name also. That's why I am using TEXT for file Name also. By using true on the finalQuery.add calls, you have said that both fields must have the word temp in them. Is that what

Re: Boolean Phrase Query question

2004-04-03 Thread Erik Hatcher
On Apr 3, 2004, at 3:05 PM, Ankur Goel wrote: By using true on the finalQuery.add calls, you have said that both fields must have the word temp in them. Is that what you meant? Or did you mean an OR type of query? I need an OR type of query. I mean the word can be in the filename or in the