lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Lucene 4.1: IntField cannot be found by a NumericRangeFilter/NumericRangeQuery
Date Mon, 04 Mar 2013 16:48:36 GMT
On Mon, Mar 4, 2013 at 11:28 AM, Konstantyn Smirnov <injecteer@yahoo.com> wrote:
> changing FT to indexed=true did the trick, thanks
>
> Shouldn't it be enabled by default?

It should be, and I think it is, so now I'm confused/worried why you
see it not enabled for indexing by default.

This is how IntField inits its TYPE_STORED:

  public static final FieldType TYPE_STORED = new FieldType();

  static {
    TYPE_STORED.setIndexed(true);
    TYPE_STORED.setTokenized(true);
    TYPE_STORED.setOmitNorms(true);
    TYPE_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
    TYPE_STORED.setNumericType(FieldType.NumericType.INT);
    TYPE_STORED.setStored(true);
    TYPE_STORED.freeze();
  }

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
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