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

Alex Deparvu commented on SOLR-16618:
-------------------------------------

working on a patch for this I ran into a tiny bug related to boolean fields. 
this type cannot be analyzed them due to an issue in the js code.

the call is 
`/solr/col/analysis/field?_=1674162562022&analysis.fieldtype=boolean&analysis.fieldvalue=true&analysis.showmatch=true&verbose_output=1&wt=json`

response comes back as 
{noformat}
{
    "responseHeader":
    {
        "status": 0,
        "QTime": 6
    },
    "analysis":
    {
        "field_types":
        {
            "boolean":
            {
                "index":
                [
                    "org.apache.solr.schema.BoolField$1$1",
                    [
                        {
                            "text": "true",
                            "raw_text": "T",
                            "raw_bytes": "[54]",
                            "start": 0,
                            "end": 0,
                            
"org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute#positionLength":
 1,
                            "type": "word",
                            
"org.apache.lucene.analysis.tokenattributes.TermFrequencyAttribute#termFrequency":
 1,
                            "position": 1,
                            "positionHistory":
                            [
                                1
                            ]
                        }
                    ]
                ]
            }
        },
        "field_names":
        {}
    }
}
{noformat}

and the js code fails on extracting the component name due to the failed 
parsing of the class name `"org.apache.solr.schema.BoolField$1$1"`

{noformat}
angular.min.js?_=9.1.0:146 TypeError: Cannot read properties of null (reading 
'join')
    at getShortComponentName (analysis.js?_=9.1.0:50:39)
    at extractComponents (analysis.js?_=9.1.0:104:28)
    at processAnalysisData (analysis.js?_=9.1.0:117:9)
    at analysis.js?_=9.1.0:180:31
    at I (angular-resource.min.js?_=9.1.0:31:74)
    at angular.min.js?_=9.1.0:159:235
    at m.$digest (angular.min.js?_=9.1.0:170:385)
    at m.$apply (angular.min.js?_=9.1.0:174:259)
    at k (angular.min.js?_=9.1.0:125:309)
    at v (angular.min.js?_=9.1.0:130:422) 'Possibly unhandled rejection: {}'
{noformat}

I think the solution would be to add a default value in case the short name 
cannot be generated. anyone has any better ideas?




> Admin UI Analysis page should include dynamic fields
> ----------------------------------------------------
>
>                 Key: SOLR-16618
>                 URL: https://issues.apache.org/jira/browse/SOLR-16618
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Admin UI, Schema and Analysis
>    Affects Versions: 8.11.2, 9.1
>            Reporter: Alex Deparvu
>            Priority: Minor
>         Attachments: analysis-page.png, schema-page.png
>
>
> The Analysis page on the collection-specific view should include dynamic 
> fields, same as the Schema page. The only option now is to use the field type 
> for analysis, which works fine but it would be more convenient to have the 
> field info too.
> Example adding a custom type
> {noformat}
> <field name="title" type="text_general"/>
> <dynamicField name="*_custom" type="text_general" indexed="true" 
> stored="true" />
> <copyField source="title" dest="title_custom" />
> {noformat}
> Field is visible on the schema page
> !schema-page.png|width=750!
> But not visible on the analysis page
> !analysis-page.png|width=750!
> Maybe a personal preference, but the dropdown search only matches the 
> beginning of the name, and it would be really nice to have it also match 
> inside the text. For example looking for 'custom' gives no results on either 
> page.



--
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