: 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=cat&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:*

...particularly when you want to put <str name="face.missing">true</str>
as a default in your solrconfig.

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

hmmm... is that really better then saying foo:[* TO *] ? ... i guess
syntacticly it's nicer, but on the other hand making people spell out the
range query forces them to conciously choose to do it ... much the same
way the "*:*" syntax for MatchAllDocs works.

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)

: 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?")



-Hoss

Reply via email to