Skip to content

MapperParsingException[Wrong value for index [yes] for field [...]] #2088

@kohanyirobert

Description

@kohanyirobert

I get the following error MapperParsingException[Wrong value for index [yes] for field [date]], when I try to put the following mapping into my totally new and empty index (created with curl -XPUT http://localhost:9200/myindex/).

curl -XPUT http://localhost:9200/myindex/mytype/_mapping -d ' {
  "mytype": {
    "properties": {
      "date": {
        "type": "long",
        "store": "yes",
        "index": "yes",
        "omit_norm": "yes",
        "omit_term_freq_and_positions": "yes"
      }   
    }   
  }
}'

Setting index to no works.

In Java using Lucene 3.6.0 I can do the following:

NumericField f = new NumericField("date", Field.Store.Yes, true);
f.setOmitNorms(true);
f.setOmitTermFreqAndPositions(true);
f.setLongValue(1L);

Document d = new Document();
d.add(f);

From this (and the documentation here, which doesn't mention that it's illegal what I'm trying to do) I assume what I'm trying to do is doable.

(I realize that elasticsearch has a date type, but I must use the mapping mentioned above.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions