[
https://issues.apache.org/jira/browse/SOLR-14970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17232567#comment-17232567
]
Munendra S N commented on SOLR-14970:
-------------------------------------
SOLR-11021 made specifying elevate.xml optional. Based on Git history,
SOLR-11865 did refactoring which introduces initialized variable. When
config-file is not specified, exception is thrown but this
[method|https://github.com/apache/lucene-solr/blob/3ae0ca23d937bef2865689748ac9e556b40aff38/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java#L284]
ensures exception is not propagated to caller (expected behavior SOLR-11021)
but initialized variable is still false. Throwing exception when config-file is
not specified doesn't seem to be intended change based on SOLR-11865
The prepare method checks for
[initialization|https://github.com/apache/lucene-solr/blob/3ae0ca23d937bef2865689748ac9e556b40aff38/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java#L458]
I think fix should be simple - to return immediately when config-file instead
of throwing the error(there might 1 or more places where this need to be
handled). Let me know if you are interested in providing the patch, would be
happy to review and commit it
> elevation does not workout elevate.xml config
> ---------------------------------------------
>
> Key: SOLR-14970
> URL: https://issues.apache.org/jira/browse/SOLR-14970
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 8.6.3
> Reporter: Bernd Wahlen
> Priority: Minor
>
> When i remove elevate.xml line from solrconfig.xml plus the file, elevation
> is not working and no error is logged.
> We put the ids directly in the query and we are not using the default fields
> or ids, so the xml is completely useless, but required to let the elevation
> component work, example query:
> {code:java}http://staging.qeep.net:8983/solr/profile_v2/elevate?q=%2Bapp_sns%3A%20qeep&sort=random_4239%20desc,%20id%20desc&elevateIds=361018,361343&forceElevation=true{code}
> {code:java}
> <searchComponent name="elevator" class="solr.QueryElevationComponent" >
> <!-- pick a fieldType to analyze queries -->
> <str name="queryFieldType">string</str>
> <str name="config-file">elevate.xml</str>
> <str name="editorialMarkerFieldName">elevated</str>
> </searchComponent>
>
> <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
> <lst name="defaults">
> <str name="echoParams">explicit</str>
> </lst>
> <arr name="last-components">
> <str>elevator</str>
> </arr>
> </requestHandler>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]