Re: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-29 Thread Chris Hostetter
: I'd argue that the behavior is incorrect. Could you raise a JIRA? that behavior was intentionally added becaus most users kept getting really confused by the older default behavion (which was previously a 0-length prefix against hte default search field) https://issues.apache.org/jir

Re: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-28 Thread Erick Erickson
Matteo: I'd argue that the behavior is incorrect. Could you raise a JIRA? Erick On Thu, Jul 28, 2016 at 1:34 AM, Matteo Grolla wrote: > Hi Alessandro, > your shot in the dark was interesting, but the behaviour doesn't > depend on the field being mandatory, it works like this for every fiel

Re: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-28 Thread Matteo Grolla
Hi Alessandro, your shot in the dark was interesting, but the behaviour doesn't depend on the field being mandatory, it works like this for every field. So it seems just wrong df=field&q=* should be translated as field:* not as *:* 2016-07-28 10:32 GMT+02:00 Matteo Grolla : > It seems a

Re: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-28 Thread Matteo Grolla
It seems a wanted behaviour (see code at the bottom), Still the behaviour seems wrong to me 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(f

Re: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-28 Thread Alessandro Benedetti
Shot in the dark , is your id your uniqueKey ? In the case, it is legit to parse the special matchAllDocsQuery as that field is mandatory and unique. So your high-level query is actually asking for all the documents in the index. I haven't checked in the code but if I remember well, that is a spec

Re: matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-28 Thread Matteo Grolla
I noticed the behaviour in solr 4.10 and 5.4.1 2016-07-28 9:36 GMT+02:00 Matteo Grolla : > Hi, > I'm surprised by lucene query parser translating this query > > http://localhost:8983/solr/collection1/select?df=id&q=* > > in > > MatchAllDocsQuery(*:*) > > I was expecting it to execute: "id:*"

matchAllDocsQuery instead of WildCardQuery from lucene qp with df and *

2016-07-28 Thread Matteo Grolla
Hi, I'm surprised by lucene query parser translating this query http://localhost:8983/solr/collection1/select?df=id&q=* in MatchAllDocsQuery(*:*) I was expecting it to execute: "id:*" is it a bug or a desired behaviour? If desired can you explain why?