lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com.INVALID>
Subject Re: How to fetch documents for which field is not defined
Date Sat, 15 Jul 2017 10:08:46 GMT
Hi,
As an alternative, function queries can also be used.exists function may be more intuitive.
q={!func}(not(exists(field3))
On Saturday, July 15, 2017, 1:01:04 PM GMT+3, Rajnish kamboj <rajnishk7.info@gmail.com>
wrote:


Ok, I will check.

On Sat, 15 Jul 2017 at 3:26 PM, Ahmet Arslan <iorixxx@yahoo.com> wrote:

> Hi,
>
> Yes, here it is:  q=+*:* -field3:[* TO *]
>
> Ahmet
>
> On Saturday, July 15, 2017, 8:16:00 AM GMT+3, Rajnish kamboj <
> rajnishk7.info@gmail.com> wrote:
>
>
> Hi
> Does Lucene provide any API to fetch documents for which a field is not
> defined.
>
> Example
> Document1 : field1=value1, field2=value2,field3=value3
>
> Document2 : field1=value4, field2=value4
>
> I want a query to get documents for which field3 is not defined. In example
> it should return Document2.
>
> Regards
> Rajnish
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message