Sorting on dates using long

2006-10-05 Thread Björn Ekengren
Hello, I am trying to get sort by date to work. The dates are of form MMddhhmm and it seems that sort sees them as Integers and discards the last four numbers since an integer isn't large enough. I tried using SortField.STRING instead but then constantrangequery breaks (date:[200501010101 TO

RE: Sorting on dates using long

2006-10-06 Thread Björn Ekengren
6 17:06 To: java-user@lucene.apache.org Subject: Re: Sorting on dates using long On 10/5/06, Björn Ekengren <[EMAIL PROTECTED]> wrote: > I am trying to get sort by date to work. The dates are of form MMddhhmm > and it seems that sort sees them as Integers and discards the last fo

Strange Spellchecker behaviour

2006-10-10 Thread Björn Ekengren
Hello, I have found that the spellchecker behaves a bit strange. My spell indexer class below doesn't work if I use the spellfield string set in the constructor directly, but it does work if I use the intern() value. The problem resides in the hasNext() method of LuceneIterator where an object c

Best solution for the Date Range problem

2006-06-12 Thread Björn Ekengren
Hi, I would like users to be able to search on both terms and within a date range. The solutions I have come across so far are: 1. Use the default QueryParser which will use RangeQuery which will expand into a number of Boolean clauses. It is quite likely that this will run into the TooManyClause

Lexical error when asterisk quantifier is first in query string

2006-06-30 Thread Björn Ekengren
queryParser.ParseException: Lexical error at line 1, column 2. Encountered: after : "" I get this when i enter a query with a asterisk (or questionmark) first in the query ( "*cene" ). Is this a bug or am I doing something wrong ? /B

Lock obtain timed out

2006-07-26 Thread Björn Ekengren
Ok, this might have been answered somewhere, but I can't find it so here goes: When I close my application containing index writers the lock files are left in the temp directory causing an "Lock obtain timed out" error upon the next restart. I works of course if I remove the locks manually inbe

RE: Lock obtain timed out

2006-07-26 Thread Björn Ekengren
After some research on addShutdownHook it seems that Eclipse terminates program rather brutally giving neither finalize nor shutdownhook any chance to run. This is a known bug in Eclipse. The application I'm writing is a server that keeps a reader and a writer open at all time. I realized last n

SOLVED: Lock obtain timed out

2006-07-27 Thread Björn Ekengren
nt: den 27 juli 2006 09:25 To: java-user@lucene.apache.org Subject: RE: Lock obtain timed out Importance: Low On Thu, 2006-07-27 at 08:59 +0200, Björn Ekengren wrote: > > > When I close my application containing index writers the > > > lock files are left in the temp direc

RE: SOLVED: Lock obtain timed out

2006-07-27 Thread Björn Ekengren
I didn't describe the context fully. The app is a server that recieves updates randomly a couple of hundred times a day and I want the index to be updated at all times. If I would recieve several updates at once I could batch it but that is quite unlikely. _ Björn Eke

Problem updating index while reader is open

2006-08-23 Thread Björn Ekengren
If I try to add documents to an index while a reader is open I get en error message saying "Cannot delete C:\myindex\_3n.f0". I suspect that this is due to the fact that the windows fs won't allow deletion of a file when there is a filehandler connected to it. The solution I have at the moment i

Sorting on date in a frequently updated index

2006-09-18 Thread Björn Ekengren
I'm experiencing problems getting sort to work correctly The result is not completely out of order, but it is certainly not correct. I have an index with the following fields: idstored, un_tokenized headerstored, tokenized body stored, tokenized keywords stored, tokenized date

RE: Sorting on date in a frequently updated index

2006-09-18 Thread Björn Ekengren
e isn't neccessarily the exact same thing as the "indexed" date value that is being sorted on. : Date: Mon, 18 Sep 2006 11:34:12 +0200 : From: Björn Ekengren <[EMAIL PROTECTED]> : Reply-To: java-user@lucene.apache.org : To: java-user@lucene.apache.org : Subject: Sorting on d