Lucene: How to construct a date range query programmatically? -


using lucene 4.2.1 api, need equivalent of

+fieldname:[2013-01-17t00:00:00z *]

constructed programmatically.

i peeked @ termrangequery , numericrangequery have not been able come quick solution.

this query no different range query, difference expects date formatted in solr format.

you can use solr's triedatefield.getrangequery construct query. tip: qparser parameter ignored can skip it.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -