On 13 March 2013 17:57, anurag.jain <anurag.k...@gmail.com> wrote: > Hi all, > > I am facing a problem. [...] > 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. [...]
Your subject line, and example are a bit confusing. I am guessing that you want all records where the (not required) "category" field does not exist. As http://wiki.apache.org/solr/SolrQuerySyntax notes, -category:[* TO *] should do that. Regards, Gora