-
-
Save juneym/58ca93e6f91489c7dc90 to your computer and use it in GitHub Desktop.
weird elasticsearch error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mapping for "biz" | |
{ | |
biz: { | |
properties: { | |
tags: { | |
index: not_analyzed | |
store: yes | |
type: string | |
} | |
id: { | |
type: string | |
} | |
content: { | |
index_analyzer: ascAnalyzer1 | |
store: yes | |
search_analyzer: standard | |
boost: 2 | |
term_vector: with_positions_offsets | |
type: string | |
} | |
dtmPosted: { | |
format: yyyy-MM-dd HH:mm:ss | |
type: date | |
} | |
username: { | |
index: not_analyzed | |
type: string | |
} | |
title: { | |
index_analyzer: ascAnalyzer1 | |
store: yes | |
search_analyzer: standard | |
boost: 3 | |
term_vector: with_positions_offsets | |
type: string | |
} | |
dtmUpdated: { | |
format: yyyy-MM-dd HH:mm:ss | |
type: date | |
} | |
classId: { | |
type: string | |
} | |
titlesrt: { | |
index: not_analyzed | |
store: yes | |
type: string | |
} | |
categories: { | |
index: not_analyzed | |
type: string | |
} | |
rating: { | |
store: yes | |
type: integer | |
} | |
country: { | |
index: not_analyzed | |
store: yes | |
type: string | |
} | |
} | |
} | |
} | |
------------------------------------------------ | |
When trying to sort by rating. | |
------------------------------------------------ | |
index: bigdataidx | |
shard: 3 | |
status: 500 | |
reason: QueryPhaseExecutionException[[bigdataidx][3]: query[ConstantScore(*:*)],from[0],size[10000],sort[<custom:"rating": org.elasticsearch.index.field.data.ints.IntFieldDataType$1@667ce8a8>!]: Query Failed [Failed to execute main query]]; nested: NumberFormatException[Invalid shift value in prefixCoded string (is encoded value really an INT?)]; | |
------------------------------------------------ | |
When trying to sort by titlesrt. | |
------------------------------------------------ | |
index: bigdataidx | |
shard: 3 | |
status: 500 | |
reason: QueryPhaseExecutionException[[bigdataidx][3]: query[ConstantScore(*:*)],from[0],size[10000],sort[<custom:"titlesrt": org.elasticsearch.index.field.data.strings.StringFieldDataType$1@147f549c>!]: Query Failed [Failed to execute main query]]; nested: IOException[Can't sort on string types with more than one value per doc, or more than one token per field]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment