lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: Browse by Letter within a Category
Date Mon, 12 Jul 2004 17:46:41 GMT
On Monday 12 July 2004 17:48, O'Hare, Thomas wrote:

> Does Lucene have a "beginning of line" query syntax, like the regular
> expression ^ symbol? For example,
> title:^A*

If your title isn't tokenized the "^" is implicit, I think. As usual, if 
your title is tokenized you can easily add another field with the same 
value as title, but in untokenized form.

> What is the best way to sort by a date? I currently have a date field
> that is used for searching in the format YYYYMMDD as a Field.Keyword. 

Lucene 1.4 added an method that takes a Sort() 
object which lets you sort by any field. Your date field can be used for 
that, as it has the correct format (because sorting it alphabetically will 
give you the right order already).



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message