You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jozef Vilcek <jo...@gmail.com> on 2012/05/22 17:52:35 UTC

How to handle filter query against empty fields

Hi all,

I have a field(s) in a schema which I need to be able to specify in a
filter query. The field is not mandatory, therefore it can be empty. I
need to be able to run a query with a filer : " return only docs which
does not have value for the field " ...

What would be the optimal recommended way of doing this with Solr?

Thanks!

Best,
Jozef

Re: How to handle filter query against empty fields

Posted by Ahmet Arslan <io...@yahoo.com>.
> I have a field(s) in a schema which I need to be able to
> specify in a
> filter query. The field is not mandatory, therefore it can
> be empty. I
> need to be able to run a query with a filer : " return only
> docs which
> does not have value for the field " ...
> 
> What would be the optimal recommended way of doing this with
> Solr?

There are two approaches for this. Please read my earlier post :

http://search-lucene.com/m/72Q4YURpgY