Hi, I was looking for the same functionality, after a short googling didn't find a solution, I assume it must exist but I finally decided to "fill" those empty fields with a representative "null value", "__null__", this is possible only if you know previously ALL the fields.
I'd like to know if there is another way that negating any possible value (-FIELD: * TO *), it seems to be "heavier" than a specified null-value to handle it. Regards, Germán Kondolf [EMAIL PROTECTED] On Tue, Mar 11, 2008 at 11:16 AM, thogau <[EMAIL PROTECTED]> wrote: > > Hi, > > > I browsed the forum searching for a way to make a query that retrieves > document that do not have any value for a given field (say MY_FIELD_NAME). > > > I read several posts advising to use this syntax : -MY_FIELD_NAME:[* TO *] > However, I am not able to have it working... > > > I have 2 documents, the first one has a value for the field MY_FIELD_NAME > (In Luke, I can see the value) and the second one has no value for it (In > Luke, I can see <not available>) > > > I would expect the query MY_FIELD_NAME:[* TO *] to retrieve the document > which has a value for the field MY_FIELD_NAME but it doesn't (Nevertheless > MY_FIELD_NAME:[a* TO z*] retrieves it) > > > Also, I would expect the query -MY_FIELD_NAME:[* TO *] to retrieve the > document which has a NO value for the field MY_FIELD_NAME but it doesn't > either... > > > I guess I am missing something obvious but I am stuck... Anybody can help to > understand what I am doing wrong? > > -- > View this message in context: > http://www.nabble.com/Searching-for-null-%28empty%29-fields%2C-how-to-use--field%3A-*-TO-*--tp15976538p15976538.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]