At 11:17 AM -0800 1/23/07, Chris Hostetter wrote:
>my point was just that if you arne't very familiar with teh syntax and
>you say: " q=* " you might assuming you'll get all docs -- and unless your
>defaultSearchField is something weird, you will get a lot of docs, but not
>neccessarily all.  if someone searches for: "  q=[* TO *]  " then they
>probably didn't just guess that, they probably know something about the
>syntax, and are more likely to realize they are just searching a single
>(default field).

I respectfully disagree.  By the same argument, q=heaven would lead to the 
expectation that all documents with the word 'heaven' would be returned.

But that's not the expectation -- it's that a field-unqualified clause will be 
qualified by the default field, whether it evaluates to a TermQuery, 
PhraseQuery, PrefixQuery, RangeQuery, RegexpQuery, WildcardQuery, etc. -- with 
'*' being -conceptually- understood as a form of PrefixQuery with a null 
prefix, as Yonik said:

>It's just that it normally surprises people that they can do foo:a*
>and not foo:*

If the field qualification is dropped, it should operate the same way on the 
default field.

>: *:* to find all documents regardless of field seems good to me, where
>: as simply * or [* TO *] would use the default field.
>
>i guess what i'm saying is that while i like the syntax of " q=field:* "
>to mean everything with a value in that field, i don't think it's worth
>adding it if as a side effect  " q=* " becomes a legal expression that
>does the same thing for hte default field, because it will be more
>missleading.

I see things differently here too... an uneducated user doesn't know field 
names, an educated user does.  If an uneducated user is frustrated with 
field-unqualified queries e.g. q=word not returning all documents with that 
word, the first thing they are going to learn is q=*:word; extending to q=*:* 
is pretty natural, IMHO.

- J.J.

Reply via email to