You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Thomas Corthals (Jira)" <ji...@apache.org> on 2020/02/20 20:48:00 UTC

[jira] [Updated] (SOLR-14268) Re-creating deleted Managed Stopwords lists results in error

     [ https://issues.apache.org/jira/browse/SOLR-14268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Corthals updated SOLR-14268:
-----------------------------------
    Labels: ManagedStopwordFilterFactory REST Solr  (was: )

> Re-creating deleted Managed Stopwords lists results in error
> ------------------------------------------------------------
>
>                 Key: SOLR-14268
>                 URL: https://issues.apache.org/jira/browse/SOLR-14268
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Schema and Analysis
>    Affects Versions: 6.6.6, 7.7.2, 8.4.1
>            Reporter: Thomas Corthals
>            Priority: Major
>              Labels: ManagedStopwordFilterFactory, REST, Solr
>
> Creating a Managed Stopwords list that has the same name as a previously deleted list results in an error if the core has been reloaded after deleting the list. Going through the same flow with Managed Synonyms doesn't result in this unexpected behaviour.
> On a newly started solr with the techproducts core:
> {code:bash}
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl http://localhost:8983/solr/admin/cores?action=RELOAD\&core=techproducts
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> {code}
> The second PUT request results in a status 500 with error msg "java.util.LinkedHashMap cannot be cast to java.util.List".
> Similar requests for synonyms work fine, no matter how many times I repeat the CREATE/DELETE/RELOAD cycle:
> {code:bash}
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedSynonymGraphFilterFactory$SynonymManager"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap
> curl http://localhost:8983/solr/admin/cores?action=RELOAD\&core=techproducts
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedSynonymGraphFilterFactory$SynonymManager"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap {code}
> Reloading after creating the Stopwords list but not after deleting it works without error too on a fresh techproducts core (you'll have to remove the directory from disk and create the core again after running the previous commands).
> {code:bash}
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl http://localhost:8983/solr/admin/cores?action=RELOAD\&core=techproducts
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> {code}
> And even curiouser, when doing a CREATE/DELETE for Stopwords, then a CREATE/DELETE for Synonyms, and only then a RELOAD of the core, the cycle can be completed twice. (Again, on a freshly created techproducts core.) Only the third attempt to create a list results in an error. Synonyms can still be created and deleted repeatedly after this.
> {code:bash}
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedSynonymGraphFilterFactory$SynonymManager"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap
> curl http://localhost:8983/solr/admin/cores?action=RELOAD\&core=techproducts
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedSynonymGraphFilterFactory$SynonymManager"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap
> curl -X DELETE http://localhost:8983/solr/techproducts/schema/analysis/synonyms/testmap
> curl http://localhost:8983/solr/admin/cores?action=RELOAD\&core=techproducts
> curl -X PUT -H 'Content-type:application/json' --data-binary \
> '{"class":"org.apache.solr.rest.schema.analysis.ManagedWordSetResource"}' \
> http://localhost:8983/solr/techproducts/schema/analysis/stopwords/testlist
> {code}
> The same successes/errors occur when running each cycle against a different core if the cores share the same configset.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org