Wor...">

How to find empty fields of a Solr document with a lucene query

I have several such documents:

<doc> <str name="navTitle"/> <str name="title">Word 1</str> </doc> <doc> <str name="navTitle">Word 2</str> <str name="title">Word 3</str> </doc> 

and I will find all documents with the "navTitle" emtpy field! How lucene request for this?

I try navTitle: and I try navTitle: but Patr Solr Admin Panal cannot find anything. What is wrong with the request?

+4
source share
1 answer

The SolrQuerySytax page says that you can use the following query to find all empty queries.

 -field:[* TO *] finds all documents without a value for field 
+13
source

All Articles