add this to your query, or filter query: q=<your query here>&fq=-category:[* TO *]
another solution would be to add a boolean field, hasCategory, and use it for filtering q=<your query here>&fq=hasCategory:true Victor anurag.jain wrote > Hi all, > > I am facing a problem. > > Problem is: > > I have updated 2500000 data to solr. > > > and some of data have "category" field and some of don't have. > > for example. > > > { > "id":"321", > "name":"anurag", > "category":"x" > }, > { > "id":"3", > "name":"john" > } > > > now i want to search that data who does not have that field. > > what query should like. > > > please reply > > It is very urgent - i have to complete this task by today itself > > thanks in advance. -- View this message in context: http://lucene.472066.n3.nabble.com/Search-data-who-does-not-have-x-field-tp4046959p4046961.html Sent from the Solr - User mailing list archive at Nabble.com.