On Jan 22, 2007, at 11:24 PM, Chris Hostetter wrote:
: So now that we have negative queries, we don't really need any
: additional/extra code for facet.missing.  It could simply be
: facet.query=-myfield:*, and that way it could be obtained without
: getting facet.field results if desired.

facet.missing can be used on a per field basis .. but i suspect a more
natural usage of it is to just use facet.missing=true when "i always want to show the user a count for resutls that don't match any value for each
of my facets"

this...
q=ipod&facet=true&facet.missing=true&facet.field=inStock&facet.field=c at&facet.field=foo
is nicer then...
q=ipod&facet=true&facet.field=inStock&facet.field=cat&facet.field=foo& facet.query=-inStock:*&facet.query=-cat:*&facet.query=-foo:*

I concur with Hoss here.

: So should we deprecate facet.missing, or is it only really used with
: facet.field queries, and often enough we would want it *in* that list?

well yeah, there's that too ... if you are parsing the facet counts
dealing with the missing count in the list for each facet field is easier
then correlating back to a facet query -- which involves some anoying
string manipulation. (where by easier and anoying i mean "if i had to do
this in XSLT how painful would it be?")

I agree here. It would be a bigger hassle to have to parse the facet_queries section to get the missing count than to simply have a "" alongside the regular values.


Pasting the below out of order to separate the issues here:

: Of course we would need to enable zero-length prefix queries in the
: SolrQueryParser for that, but I think we should do that anyway.

I agree with Yonik here. Having field:* would be much more natural than field:[* TO *].

acctually, that's makes me realize: if you support zero width prefix
queries, then "*" is going to be parsed as a zero width prefix on whatever
the defaultSearchField is and return all results which have a value in
that field ... but that may confuse a lot of people who might assume it is giving them all docs in the index (and since they are going to get results
instead of errors, they won't have any indication that they are wrong)

Hmmm... good point. But the same expectation would be the case with [* TO *] too.

*:* to find all documents regardless of field seems good to me, where as simply * or [* TO *] would use the default field.

        Erik

Reply via email to