java - Numeric Range Query -


i read handling date range query numericrangequery better termrangequery in "lucene in action", couldnot find reason. want know reason behind it. used termrangequery , numericrangequery both handling date range query , found searching fast via numericrangequery.

my second point query using numericrangequery have create indexes using numericfield can create indexes upto milisecond if want reduce resolution upto hour or day.

  • why numeric faster term?

as have noted, there "precision step". means numbers stored precision, means there (very) limited number of terms. according documentation, rare have more 300 terms in index. check out wikipedia article on tries if interested in theory.

  • how can reduce precision?

the numericfield class has "precision" parameter in constructor. note range query has precision parameter, , must same. javadoc page has link paper written implementation explaining more of precision means.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -