lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6232) Replace ValueSource context Map with a more concrete data type
Date Fri, 13 Feb 2015 19:36:12 GMT


Yonik Seeley commented on LUCENE-6232:

Here's the one I came up with in Heliosearch:

It's called QueryContext since it seemed it could be more generic than just for value sources.

If we switch from IdentityHashMap (which is currently used) to HashMap, it might be good to
make sure any heavy-weight equals implementations check for other==this.

Regarding the current patch on this issue,
+  public Map<String,FunctionValues> getValuesCache() {

That seems rather specific to a particular kind of value source and probably doesn't belong
at this level?

> Replace ValueSource context Map with a more concrete data type
> --------------------------------------------------------------
>                 Key: LUCENE-6232
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mike Drob
>         Attachments: LUCENE-6232.patch, LUCENE-6232.patch
> Inspired by LUCENE-3973
> The context object used by ValueSource and friends is a raw Map that provides no type
safety guarantees. In our current state, there are lots of warnings about unchecked casts,
raw types, and generally unsafe code from the compiler's perspective.
> There are several common patterns and types of Objects that we store in the context.
It would be beneficial to instead use a class with typed methods for get/set of Scorer, Weights,

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message