lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tanguy Moal <>
Subject Re: Optional filter queries
Date Wed, 04 Jan 2012 08:32:27 GMT

If the number stored is not in a string field, you will need solr >= 3.5 
to perform what you want.

Since solr 3.5 it's possible to set the attribute sortMissingLast or 
sortMissingFirst to true, within the field definition (an example is 
available in the schema.xml provided with solr 3.5)

Hope this helps,


Le 04/01/2012 06:33, Christopher Childs a écrit :
> -filterMinutes:[* TO *] should return documents that do not have a value assigned to
that field.
> On Jan 3, 2012, at 11:30 PM, Allistair Crossley wrote:
>> Evening all,
>> A subset of my documents have a field, filterMinutes, that some other documents do
not. filterMinutes stores a number.
>> I often issue a query that contains a filter query range, e.g.
>> q=filterMinutes:[* TO 50]
>> I am finding that adding this query excludes all documents that do not feature this
field, but what I want is for the filter query to act upon those documents that do have the
field but also to return documents that don't have it at all.
>> Is this a possibility?
>> Best,
>> Allistair

View raw message