: Sorry Hoss if I came down too hard against the view that "*" should mean
: "all docs".  With the renewed clarity that getting a little sleep
: brings, I better appreciate the merits of your position.  And that it's
: dangerous trying to decide what makes sense for other people.

no worries ... i didn't take it as being harsh.

I don't actually have any opinion about what a plain q=* should do ... I
just worry that if we add zero width prefixes, and that results in q=*
meaning q=defaultSearchField:* that might confuse a lot of people who
expect it to be something else.

if 50% of the people thing q=* means one thing, and 50% think q=* means
something else, then the safest thing to do is probably to make sure
that q=* is an error.

: Obviously from a practical perspective, a MatchAllDocsQuery is quite a
: bit faster than matching all docs having some value for a particular
: field, and should be encouraged unless the latter is explicitly desired.

FYI: there is special syntax in the trunk Lucene QueryParser for
generating a MatchAllDocs, it's:  *:* ... we just don't use that version
of Lucene in Solr yet.

: Now I think there is fair agreement that it would be great if field:*
: could be made to work.  So if some portion of users want unqualified *

i actually have no opinion on that either ... i think field:[* TO *] is
just as easy to use, and less prone to confusion about what it means (ie:
you have to understand some of the syntax to know to try and use it, you
aren't likely to inadvertantely use it and think you're getting a
different result set then you really are)

: processed as the equivalent of <default-field>:*, then perhaps there
: should be a configuration directive which controls whether unqualified *
: (or perhaps any defined string) is trapped?  I haven't come across
: existing SOLR code to handle "*" as a special case of PrefixQuery, so I
: assume the trapping should be at the level of SolrQueryParser, similar
: to how [* TO *] is trapped for range queries?

there is a QueryParser.setAllowLeadingWildcard method which we could set
based on a schema value (much like we do for the defaultOperator) ... i
think it would be perfectly fine making that an option which defaults to
false and the result of enabling it being that q=* uses the
defaultSearchField ... at least then people need to consider the issue and
turn it on first.



-Hoss

Reply via email to