[ 
https://issues.apache.org/jira/browse/LUCENE-2979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009972#comment-13009972
 ] 

Phillipe Ramalho commented on LUCENE-2979:
------------------------------------------

Hi,

I am considering doing a gsoc proposal about this, any specific points I should 
be covering on the proposal?

I saw Adriano's comment on another LUCENE-1823:

{quote}
The map idea is really good and fits well as configuration for the QP, but I 
would like to restrict the key type, so the user doesn't use a String object as 
key. String keys may lead to runtime errors, mainly when they are inserted 
inline. I would prefer to use enums as keys, it would enforce the user to 
always pass the same object as key when referencing the same configuration. It 
also avoids duplicated configuration keys, once each enum type has only one 
instance per JVM.

If nobody complains about using a Map<Enum<?>, Object> as configuration for QP 
framework, I will start working on a new patch including these changes soon.
{quote}

I will try to initially cover how we can use Map to replace the current config 
API. Also I would like to cover how/whether we can make the new API compatible 
with the old one, so users can migrate from old to new slowly, deprecating the 
old one of course. I will also investigate the best way to enforce the user to 
always pass the same key object. Also try to suggest an API that will allow the 
users to retrieve the config values without casting them from Object, maybe 
Java generic capability will enable it, but I am not sure it will work with 
Enum.

Anything else I should be covering on the proposal?

> Simplify configuration API of contrib Query Parser
> --------------------------------------------------
>
>                 Key: LUCENE-2979
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2979
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/*
>    Affects Versions: 2.9, 3.0
>            Reporter: Adriano Crestani
>              Labels: api-change, gsoc, gsoc2011, lucene-gsoc-11
>             Fix For: 3.2, 4.0
>
>
> The current configuration API is very complicated and inherit the concept 
> used by Attribute API to store token information in token streams. However, 
> the requirements for both (QP config and token stream) are not the same, so 
> they shouldn't be using the same thing.
> I propose to simplify QP config and make it less scary for people intending 
> to use contrib QP. The task is not difficult, it will just require a lot of 
> code change and figure out the best way to do it. That's why it's a good 
> candidate for a GSoC project.
> I would like to hear good proposals about how to make the API more friendly 
> and less scaring :)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to