Re: How to fetch documents for which field is not defined

2017-08-07 Thread Ahmet Arslan
How about Solr's exists function query? How does it work?function queries are now part of Lucene (org.apache.lucene.queries.function.) right? Ahmet On Sunday, July 16, 2017, 11:19:40 AM GMT+3, Trejkaz wrote: On Sat, Jul 15, 2017 at 8:12 PM, Uwe Schindler wrote: > That is the "Solr" answer.

Re: How to fetch documents for which field is not defined

2017-07-16 Thread Trejkaz
On Sat, Jul 15, 2017 at 8:12 PM, Uwe Schindler wrote: > That is the "Solr" answer. But it is slow like hell. > > In Lucene there is a natove query named FieldValueQuery already for this. > It requires DocValues enabled for the field. > > IMHO, the best and fastest variant (also to Solr users) is t

Re: How to fetch documents for which field is not defined

2017-07-15 Thread Uwe Schindler
That is the "Solr" answer. But it is slow like hell. In Lucene there is a natove query named FieldValueQuery already for this. It requires DocValues enabled for the field. IMHO, the best and fastest variant (also to Solr users) is to add a separate multivalued string field named 'fieldnames' w

Re: How to fetch documents for which field is not defined

2017-07-15 Thread Rajnish kamboj
Thanks.. Which lucene version supports this and what is the performance of such queries on large set of documents. On Sat, 15 Jul 2017 at 3:38 PM, Ahmet Arslan wrote: > Hi, > As an alternative, function queries can also be used.exists function may > be more intuitive. > q={!func}(not(exists(fi

Re: How to fetch documents for which field is not defined

2017-07-15 Thread Ahmet Arslan
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 wrote: Ok, I will check. On Sat, 15 Jul 2017 at 3:26 PM, Ahmet Arslan wrote: > Hi, > > Yes, here it is: 

Re: How to fetch documents for which field is not defined

2017-07-15 Thread Rajnish kamboj
Ok, I will check. On Sat, 15 Jul 2017 at 3:26 PM, Ahmet Arslan wrote: > Hi, > > Yes, here it is: q=+*:* -field3:[* TO *] > > Ahmet > > On Saturday, July 15, 2017, 8:16:00 AM GMT+3, Rajnish kamboj < > rajnishk7.i...@gmail.com> wrote: > > > Hi > Does Lucene provide any API to fetch documents for

Re: How to fetch documents for which field is not defined

2017-07-15 Thread Ahmet Arslan
Hi, Yes, here it is:  q=+*:* -field3:[* TO *] Ahmet On Saturday, July 15, 2017, 8:16:00 AM GMT+3, Rajnish kamboj 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,