You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Matteo Grolla (JIRA)" <ji...@apache.org> on 2016/07/28 08:39:20 UTC
[jira] [Created] (SOLR-9352) matchAllDocsQuery instead of
WildCardQuery from lucene qp with df and *
Matteo Grolla created SOLR-9352:
-----------------------------------
Summary: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *
Key: SOLR-9352
URL: https://issues.apache.org/jira/browse/SOLR-9352
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Affects Versions: 5.4, 4.10
Reporter: Matteo Grolla
Hi,
I'm surprised by lucene query parser translating this query
http://localhost:8983/solr/collection1/select?df=id&q=*
in
<str name="parsedquery">MatchAllDocsQuery(*:*)</str>
I was expecting it to execute: "id:*"
the problem seems to be in
in o.a.s.parser.SolrQueryParserBase:
the field is not set explicity but in the df, so getExplicitField returns null
// called from parser
protected Query getWildcardQuery(String field, String termStr) throws SyntaxError {
checkNullField(field);
// *:* -> MatchAllDocsQuery
if ("*".equals(termStr)) {
if ("*".equals(field) || getExplicitField() == null) {
return newMatchAllDocsQuery();
}
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org