lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Mintern <mint...@easyesi.com>
Subject Re: NumericField exception java.lang.IllegalStateException: call set???Value() before usage in lucene 3.5
Date Tue, 27 Mar 2012 19:12:22 GMT
On Tue, Mar 27, 2012 at 12:21 AM, jianwen lou <loujanwen@gmail.com> wrote:
> I want to store the long type value to my index files like follwing:
>
>                NumericField priceField = new NumericField("price");
>                priceField.setDoubleValue(temp.getCurrentprice());
>                document.add(priceField);
>
-->                NumericField salesField = new NumericField("salescount");
-->                priceField.setLongValue(temp.getSalescount());
>                document.add(salesField);

It looks like you're setting priceField's value again instead of
salesField's. Looks like a copy-paste that wasn't fully edited.

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


Mime
View raw message