lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wilkowski ...@silenteight.com>
Subject Re: Determine whether a MatchAllQuery or a Query with atleast one Term
Date Sat, 28 Nov 2015 06:59:47 GMT
Instanceof?

MW
Sent from Mi phone
On 28 Nov 2015 06:57, "Sandeep Khanzode" <sandeep_khanzode@yahoo.com.invalid>
wrote:

> Hi,
> I have a question.
> In my program, I need to check whether the input query is a MatchAll Query
> that contains no terms, or a Query (any variant) that has at least one
> term. For typical Term queries, this seems reasonable to be done with
> Query.extractTerms(Set<> terms) which gives the list of terms.
> However, when there is a NumericRangeQuery, this method throws an
> UnsupportedOperationException.
> How can I determine that a NumericRangeQuery or any non-Term query exists
> in the Input Query and differentiate it from the MatchAllQuery? -- SRK

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message