lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Strange sort error
Date Thu, 14 Apr 2005 23:46:10 GMT

: one is sorting on doesn't even have to exist in all the documents.  I
: think it would be even more confusing for an invalid query suddenly
: becoming a valid query in the future just because someone added a doc

Or worse, a query that does work today, stops working tomorow because one
doc was removed.

: with that field indexed (esp since that doc may not even match the
: query being sorted).

In my mind, thta's the real crux of the issue...

Imagine you have two general classes of Documents:  "animals" and "plants"
-- all documents have some fields in common, including a "doctype" field
(which is allways either "plant" or "animal") but there may be some fields
which are exlusive to each type (ie: "number_of_legs", "avg_root_depth").

doing a search on something like "description:africa" sorted by score,
might return you all the plants and animals in africa.  sorting by
"number_of_legs" would get you the same results, but all the animals would
come first (since the plants don't have any legs).  a search for
"doctype:plant description:africa" would only return you plants, but even
then it would still work if you sorted by "number_of_legs".

so why then should it stop working if all of hte animals gradually become
extinct and get removed from the index.

: In short, I think sorting should act like querying (no exception if
: field doesn't exist yet).

agreed.




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message