[ 
https://issues.apache.org/jira/browse/SOLR-16139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818090#comment-17818090
 ] 

Robet Olson commented on SOLR-16139:
------------------------------------

Our project ran into this same issue when porting a pivot facet to Solr 9.5. 
Here, if we have data that looks like this:

{{{{   {}}}}
{{{{      "anno" : "Apple,", "name" : "name_1", "type" : "Round,", "value" : 
"1" }, {}}}}
{{{{      "anno" : "Apple,", "name" : "name_2", "type" : "Round,", "value" : 
"2" }, {}}}}
{{{{      "anno" : "Apple,", "name" : "name_3", "type" : "oval", "value" : "3" 
}, {}}}}
{{{{      "anno" : "Apple,", "name" : "name_4", "type" : "oval", "value" : "4" 
}, {}}}}
{{{{      "anno" : "Orange", "name" : "name_5", "type" : "Round,", "value" : 
"5" }, {}}}}
{{{{      "anno" : "Orange", "name" : "name_6", "type" : "Round,", "value" : 
"6" }, {}}}}
{{{{      "anno" : "Orange", "name" : "name_7", "type" : "oval", "value" : "7" 
}, {}}}}
{{       "anno" : "Orange", "name" : "name_8", "type" : "oval", "value" : "8" 
}}}}}

and perform a query with {{ facet.pivot=type,anno }}the result we get does not 
work properly when type = "Round" does but when type = "oval". Here, both those 
fields are defined to be case insensitive:

{{  <fieldType name="string_ci" class="solr.SortableTextField" 
sortMissingLast="true" omitNorms="true">}}
{{    <analyzer type="index">}}
{{      <tokenizer class="solr.KeywordTokenizerFactory"/>}}
{{      <filter class="solr.LowerCaseFilterFactory"/>}}
{{      <filter class="solr.WordDelimiterGraphFilterFactory" 
stemEnglishPossessive="1" splitOnNumerics="1" splitOnCaseChange="1" 
generateWordParts="1" generateNumberParts="1" catenateWords="1" 
catenateNumbers="1" catenateAll="1" preserveOriginal="1"/>}}
{{      <filter class="solr.FlattenGraphFilterFactory"/>}}
{{    </analyzer>}}

{{    <analyzer type="query">}}
{{      <tokenizer class="solr.KeywordTokenizerFactory"/>}}
{{      <filter class="solr.LowerCaseFilterFactory"/>}}
{{      <filter class="solr.WordDelimiterGraphFilterFactory" 
stemEnglishPossessive="1" splitOnNumerics="1" splitOnCaseChange="1" 
generateWordParts="1" generateNumberParts="1" catenateWords="1" 
catenateNumbers="1" catenateAll="1" preserveOriginal="1"/>}}
{{    </analyzer>}}
{{  </fieldType>}}

 

I can work around the problem by changing the field types to a plain 
solr.StrField and it works as expected. However this is a large system and I 
worry about unexpected consequences of the change. I see this issue has sat 
idle for a couple months; I wonder if there is any change in behavior being 
contemplated. If not this seems there should be a note in the release notes 
about the new behavior.

 

Thanks much,

Bob Olson

> [Regression] JSON stat facet functions not working on analysed String 
> (SortableTextField)
> -----------------------------------------------------------------------------------------
>
>                 Key: SOLR-16139
>                 URL: https://issues.apache.org/jira/browse/SOLR-16139
>             Project: Solr
>          Issue Type: Bug
>          Components: faceting
>    Affects Versions: 8.11.1
>            Reporter: Jan Verbeeck
>            Priority: Critical
>              Labels: faceting, json
>
> After updating Solr on my dev environment to version 8.11.1 I noticed nested 
> json stat facets where not working anymore. When downgrading to 8.11.0 worked 
> as before.
> It seems the problem is related to using an analysed string fieldtype like 
> 'solr.SortableTextField' and then using a subfacet with a stat facet function 
> like 'avg'.
>  
> I have managed to reproduce this behaviour using docker. You can find the 
> repository here: 
> [solr-json-repro|https://github.com/verbeeckjan/solr-json-repro]
>  
> The only change I made to the default managed-schema is to change the type of 
> the dynamic field '*_s' to 'text_gen_sort'.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to