AW: Indexing an IntField but getting SotredField from found Document

2015-02-19 Thread Clemens Wyss DEV
> I think if you follow the Field.fieldType().numericType() chain you'll >end up with INT or DOUBLE or whatever. Thx! > But if you know you stored it as an IntField then surely you >already know it's an integer? True, but the nature of the dynamic framework we build around Lucene requires the

Re: Indexing an IntField but getting SotredField from found Document

2015-02-19 Thread Ian Lea
I think if you follow the Field.fieldType().numericType() chain you'll end up with INT or DOUBLE or whatever. But if you know you stored it as an IntField then surely you already know it's an integer? Unless you sometimes store different things in the one field. I wouldn't do that. -- Ian. O

Re: High frequency terms in results document....

2015-02-19 Thread Tomoko Uchida
It seems to be the very similar discussion about this topic, I've just missed it. Number of approaches are there. http://mail-archives.apache.org/mod_mbox/lucene-java-user/201502.mbox/%3CCAON7oqQh4aXoKfWyn=7odzwc48h_vvjjaabpfadmqehstzz...@mail.gmail.com%3E > Looks like it goes thru every term and

Re: High frequency terms in results document....

2015-02-19 Thread Shouvik Bardhan
Thanks for your input Uchida. I will try that out. I wonder what is the magic sauce in Luke's set of calls which allows it to create say top 100 terms even from a index with 100 million docs (small docs though for me). Looks like it goes thru every term and puts them in a priority queue and takes t

Indexing an IntField but getting SotredField from found Document

2015-02-19 Thread Clemens Wyss DEV
When I index a Document with an IntField and then find that very Document the former IntField is returned as StoredField. How do I determine the "original" fieldtype (IntField, LongField, DoubleField ...)? Must I ? Number number = Field.numericValue(); if( number != null ) { if( number instanc