NumberFormatException on facetting by field


(barnybug) #1

See test case here:

Hopefully nothing I'm obviously doing wrong - on 0.18.7 I see this
error to the query:


"QueryPhaseExecutionException[[test][2]:
query[filtered(ConstantScore(:))-

FilterCacheFilterWrapper(_type:a)],from[0],size[10]: Query Failed
[Failed to execute main query]]; nested: NumberFormatException[Invalid
shift value in prefixCoded string (is encoded value really an INT?)];
"

Help appreciated!

regards,

Barnaby


(Shay Banon) #2

You have a field named field1 on both mapping types, a and b, but they are
not of the same field type. The first is an integer, the second is a long
(automatically derived). For facets / sorting, field types with the same
name across mapping types must be the same (its an optimization to conserve
memory) even though you specifically define the mapping type to search on.

On Thu, Jan 12, 2012 at 8:23 PM, barnybug barnybug@googlemail.com wrote:

See test case here:
https://gist.github.com/1602182

Hopefully nothing I'm obviously doing wrong - on 0.18.7 I see this
error to the query:
https://gist.github.com/1602207
"QueryPhaseExecutionException[[test][2]:
query[filtered(ConstantScore(:))-

FilterCacheFilterWrapper(_type:a)],from[0],size[10]: Query Failed
[Failed to execute main query]]; nested: NumberFormatException[Invalid
shift value in prefixCoded string (is encoded value really an INT?)];
"

Help appreciated!

regards,

Barnaby


(barnybug) #3

Good spot. Thanks.

regards,

Barnaby

On Jan 12, 9:56 pm, Shay Banon kim...@gmail.com wrote:

You have a field named field1 on both mapping types, a and b, but they are
not of the same field type. The first is an integer, the second is a long
(automatically derived). For facets / sorting, field types with the same
name across mapping types must be the same (its an optimization to conserve
memory) even though you specifically define the mapping type to search on.

On Thu, Jan 12, 2012 at 8:23 PM, barnybug barny...@googlemail.com wrote:

See test case here:
https://gist.github.com/1602182

Hopefully nothing I'm obviously doing wrong - on 0.18.7 I see this
error to the query:
https://gist.github.com/1602207
"QueryPhaseExecutionException[[test][2]:
query[filtered(ConstantScore(:))-

FilterCacheFilterWrapper(_type:a)],from[0],size[10]: Query Failed
[Failed to execute main query]]; nested: NumberFormatException[Invalid
shift value in prefixCoded string (is encoded value really an INT?)];
"

Help appreciated!

regards,

Barnaby


(system) #4