-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MapperParsingException[Wrong value for index [yes] for field [...]] #2088
Comments
The allowed values for "index" are "no", "not_analyzed" and "analyzed"
Why? Given that that is pretty much exactly what the 'date' field maps Also, why are you storing the field? Each stored field means another clint |
Okay, you're right, thanks for the heads up. Reading ES's documentation on numeric fields I somehow assumed that an index mapping's value can only be no or yes, because the possible values wasn't listed beside mapping field's documentation.
Did you ever hear about legacy code? :) Thanks for the help. |
@kohanyirobert in Lucene, there isn't really a meaning for analysis on numeric fields, so in ES, |
@kimchy Yeah, I've already managed to figure this out. What lead me astray was that the legacy code I'm porting to ES created Lucene numeric fields using a constructor which takes a boolean argument named index. From this (and from the documentation) it was evident for me that a numeric field can be indexed (yes) and not indexed (no). |
So the conclusion is we can only use 'analyzed','not_analyzed' or 'no' with index for date and numeric fields; and shouldn't use 'yes', right?! (if it is so then why the documentation is not reflecting the same! : ( ) |
Core type documentation does indeed mention http://www.elasticsearch.org/guide/reference/mapping/core-types.html and http://www.elasticsearch.org/guide/reference/mapping/type-field.html could make a better mention of possible values as well. |
i think the document of http://www.elasticsearch.org/guide/reference/mapping/core-types.html on boolean and long types has a mistake. "yes" should be "not_analyzed" or "analyzed". |
@zorksylar, you're so right! |
@clintongormley you suggest not setting store to true, but the documentation for number and boolean suggest it should be set to "yes" if index is set to "no". It further says otherwise there is nothing we can do with it. |
Companion PR to elastic#25778
* es/6.x: (155 commits) Make persistent tasks work. Made persistent tasks executors pluggable. Removed ClientHelper dependency from PersistentTasksService. Added AllocatedPersistentTask#waitForPersistentTaskStatus(...) that delegates to PersistentTasksService#waitForPersistentTaskStatus(...) Add adding ability to associate an ID with tasks. Remove InternalClient and InternalSecurityClient (#3054) Make the persistent task status available to PersistentTasksExecutor.nodeOperation(...) method Refactor/to x content fragments2 (#2329) Make AllocatedPersistentTask members volatile (#2297) Moves more classes over to ToXContentObject/Fragment (#2283) Adapt to upstream changes made to AbstractStreamableXContentTestCase (#2117) Move tribe to a module (#2088) Persistent Tasks: remove unused isCurrentStatus method (#2076) Call initialising constructor of BaseTasksRequest (#1771) Always Accumulate Transport Exceptions (#1619) Pass down the provided timeout. Fix static / version based BWC tests (#1456) Don't call ClusterService.state() in a ClusterStateUpdateTask Separate publishing from applying cluster states Persistent tasks: require allocation id on task completion (#1107) Fixes compile errors in Eclipse due to generics ...
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 withcurl -XPUT http://localhost:9200/myindex/
).Setting
index
tono
works.In Java using Lucene 3.6.0 I can do the following:
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.)
The text was updated successfully, but these errors were encountered: