[
https://issues.apache.org/jira/browse/SOLR-18175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117442#comment-18117442
]
ASF subversion and git services commented on SOLR-18175:
--------------------------------------------------------
Commit b50f0a7f578d6e6c87fda95972d8d7742ca3569e in solr's branch
refs/heads/main from Xinyao Zhang
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=b50f0a7f578 ]
SOLR-18175: Use HTTP status 400 (not 500) for unsupported field existence
queries (#4915)
> A FieldExistsQuery IllegalStateException should result in HTTP 400 not 500
> error
> --------------------------------------------------------------------------------
>
> Key: SOLR-18175
> URL: https://issues.apache.org/jira/browse/SOLR-18175
> Project: Solr
> Issue Type: Improvement
> Reporter: David Smiley
> Priority: Minor
> Labels: newdev, pull-request-available
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> If you issue an existence query {{field:*}} yet that field does not support
> Lucene's {{FieldExistsQuery}}, FEQ.rewrite will throw IllegalStateException:
> bq. FieldExistsQuery requires that the field indexes doc values, norms or
> vectors, but field 'foo' exists and indexes neither of these data structures
> Solr ultimately returns a HTTP 500, which is not what we want. We want HTTP
> 400. Note that I discovered this via a {{facet.query}} and have yet to check
> if it were to happen simply in a {{q}}. The change likely involves modifying
> Solr {{FieldType.getExistenceQuery}} to throw an exception with the 400 code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]