Hi

For the purpose of running a distributed search and fix the local term
statistics to be the global one, we do the following:

(1) Receive a query String and parse into a Query object
(2) Call q.extractTerms()
(3) Fetch stats from each Searcher (forget about caching at the moment)
(4) Transmit the fixed statistics to all searchers so they fix their local
stats with the global ones.

If the query contains a range clause, extractTerms() throws
UnsupportedOperationException, because NumericRangeQuery (and MTQ) do not
override Query.extractTerms. I understand that the numeric range terms are
meaningless, and so I would at least expect it to not do anything, rather
than throw UOE. Throwing an exception IMO is too drastic for this
operation, and it prevents useful functionality.

The question is where to fix it -- maybe we should change Query's impl to
not do anything? Or, we fix NRQ/MTQ to override with a silent no-op impl,
and in trunk make Query.extractTerms abstract?

If someone has an idea on how we can obtain the list of query Terms,
avoiding the exception (but also avoid looping through all the clauses),
please share it.

Shai

Reply via email to