[
https://issues.apache.org/jira/browse/SOLR-17311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chatree Srichart updated SOLR-17311:
------------------------------------
Description:
Why the SortSpectParsing add null field even the sort direction is found.
When I sort by a child field with a CursorMark:
childfield(groupName_s,{!parent which='{*}:{*} -{_}nest_path{_}:*'
v='{_}nest_path{_}:
/customer'}) asc,id desc
The null value will be set to BytesToStringComparator.setTopValue(value) method
which will cause this error:
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()"
because "text" is null
at org.apache.lucene.util.BytesRef.<init>(BytesRef.java:84) ~[?:?]
Actually the field can be gotten from:
((ChildFieldValueSourceParser.BlockJoinSortFieldValueSource) ((FunctionQuery)
q).getValueSource()).childField
See attached screenshot: null_field_it_set_to_top_vallue.png
!null_field_it_set_to_top_vallue.png!
Is it a bug?
was:
Why the SortSpectParsing add null field even the sort direction is found.
When I sort by a child field with a CursorMark:
childfield(groupName_s,\{!parent which='*:* -_nest_path_:*'
v='_nest_path_:\\/customer'}) asc,id desc
The null value will be set to BytesToStringComparator.setTopValue(value) method
which will cause this error:
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()"
because "text" is null
at org.apache.lucene.util.BytesRef.<init>(BytesRef.java:84) ~[?:?]
Actually the field can be gotten from:
((ChildFieldValueSourceParser.BlockJoinSortFieldValueSource) ((FunctionQuery)
q).getValueSource()).childField
See attached screenshot: null_field_it_set_to_top_vallue.png
Is it a bug?
> SortSpectParsing add null field even the sort direction is found
> ----------------------------------------------------------------
>
> Key: SOLR-17311
> URL: https://issues.apache.org/jira/browse/SOLR-17311
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: query
> Affects Versions: 8.11.1
> Reporter: Chatree Srichart
> Priority: Major
> Attachments: add_field.png, null_field_it_set_to_top_vallue.png
>
>
> Why the SortSpectParsing add null field even the sort direction is found.
> When I sort by a child field with a CursorMark:
>
> childfield(groupName_s,{!parent which='{*}:{*} -{_}nest_path{_}:*'
> v='{_}nest_path{_}:
> /customer'}) asc,id desc
>
> The null value will be set to BytesToStringComparator.setTopValue(value)
> method which will cause this error:
>
> java.lang.NullPointerException: Cannot invoke
> "java.lang.CharSequence.length()" because "text" is null
> at org.apache.lucene.util.BytesRef.<init>(BytesRef.java:84) ~[?:?]
>
> Actually the field can be gotten from:
>
> ((ChildFieldValueSourceParser.BlockJoinSortFieldValueSource) ((FunctionQuery)
> q).getValueSource()).childField
>
> See attached screenshot: null_field_it_set_to_top_vallue.png
>
> !null_field_it_set_to_top_vallue.png!
>
> Is it a bug?
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]