Sorry, I didnt explain my self good, I mean , you have to create an additional field 'hasCategory' in your schema, and then, before indexing, set the field 'hasCategory' in the indexed document as true, if your document has categories, or set it to false, if it has any. With this you will save computation time, since the query for a boolean field is much easier for Solr than checking for an empty string field.
The query should be => q=*:*&fq=hasCategory:true anurag.jain wrote > "another solution would be to add a boolean field, hasCategory, and use it > for filtering > q= > <your query here> > &fq=hasCategory:true " > > > I am not getting result. > > > i am trying > > localhost:8983/search?q=*:*&fq=category:true > > it is giving zero result. > > by the way first technique is working fine. -- View this message in context: http://lucene.472066.n3.nabble.com/Search-data-who-does-not-have-x-field-tp4046959p4054763.html Sent from the Solr - User mailing list archive at Nabble.com.