This could be done with a function query, except that the function I would use does not exist. There is no function that returns the number of values that exist for a field. If there were, you could say:
-field:A OR (field:A and function() > 1) I don't know the Lucene data structures well, but I suspect this would be incredibly expensive to calculate. On 3/11/10, Jean-Sebastien Vachon <js.vac...@videotron.ca> wrote: > Hi All, > > I'd like to know if it is possible to do the following on a multi-value > field: > > Given the following data: > > document A: field1 = [ A B C D] > document B: field 1 = [A B] > document C: field 1 = [A] > > Can I build a query such as : > > -field: A > > which will return all documents that do not have "exclusive" A in the their > field's values. By exclusive I mean that I don't want documents that only > have A in their list of values. In my sample case, the query would return > doc A and B. > Because they both have other values in field1. > > It this kind of query possible with Solr/Lucene? > > Thanks > > > > -- Lance Norskog goks...@gmail.com