lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kauler, Leto S" <leto.kau...@education.tas.gov.au>
Subject RE: Exception: cannot determine sort type
Date Thu, 23 Dec 2004 23:15:33 GMT
Thanks for the replies!  It would seem best for us to move to specifying
the sort type--good practice anyway and prevents possible field
problems.  I plan to run the stress testing again today but turning off
the sorting (just using default SCORE) and see how that goes.

Seasons greetings to you all.
--Leto


Daniel Naber wrote:
> Is it a certain query that causes this? Does it really only 
> happen under 
> load or does the same query also give this without load?

Each page on our website gathers content from Lucene using predefined
queries, kind of like a database.  The odd thing: I can not replicate
the problem if I browse the site casually.  It's only under this stress
testing that the problem occurs.  It does not happen on specific
pages/queries, but more random--about every second to fourth query has
the exception.

Makes me wonder if our code is crossing over somewhere when multiple
queries are performed at the same time.


Erik Hatcher wrote:
> The issue occurs if the first field it accesses parses as a numeric 
> value and then successive fields are String's.  If you are mixing and 
> matching numeric and text information in this Title_Sort field you 
> should specify the type.

Chris Hostetter wrote:
> I could be wrong, but if i remember right, the code that AUTO uses 
> to determine what sort type to use will treat it as a number if it 
> *starts* with something that looks like a number ... so look for
titles 
> like "1000 year plan" in your data.

That makes sense. Our titles would sometimes contain, even start with,
numbers.


Erik Hatcher wrote:
> *Everything* in Lucene is indexed as a string.  But how a 
> date looks as 
> a string is a topic unto itself.  I prefer to use YYYYMMDD as a date 
> formatted as a string (but when sorting, this could be treated as a 
> numeric).

Will RangeQuery still work with that?  We do have separate date fields
which are indexed like the following code, but a move to the YYYYMMDD
format might be good as then we could apply a blanket String-type sort.

public static Date parseDate( String s )
   DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
   return dateFormat.parse(s);
}
doc[0].add(Field.Keyword(field, parseDate( dateInString )));


CONFIDENTIALITY NOTICE AND DISCLAIMER

Information in this transmission is intended only for the person(s) to whom it is addressed
and may contain privileged and/or confidential information. If you are not the intended recipient,
any disclosure, copying or dissemination of the information is unauthorised and you should
delete/destroy all copies and notify the sender. No liability is accepted for any unauthorised
use of the information contained in this transmission.

This disclaimer has been automatically added.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message