[jira] [Commented] (SOLR-7059) Using paramset with multi-valued keys leads to a 500

2015-01-30 Thread Noble Paul (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14299713#comment-14299713
 ] 

Noble Paul commented on SOLR-7059:
--

I guess we should just make it a MapString,Object .

 Using paramset with multi-valued keys leads to a 500
 

 Key: SOLR-7059
 URL: https://issues.apache.org/jira/browse/SOLR-7059
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.0
Reporter: Anshum Gupta
Assignee: Noble Paul
 Fix For: 5.0, Trunk, 5.1


 Here's my use case:
 I wanted to use param-sets to have {{facet.field=field1facet.field=field2}}
 For the same, here is what I updated:
 {code}
 curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d 
 '{
   set : { 
 facets : {
   facet.field:[start_station_name,end_station_name]
 }
   }
 }'
 {code}
 When I tried to use the same, I got a 500.
 After looking at the code, seems like, RequestParams uses MapSolrParams, 
 which banks on MapString,String map.
 This would need to change to support the multi-values.
 I also tried sending:
 {code}
 solr-5.0.0-SNAPSHOT  curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d '{update : { facets : 
 {facet.field:start_station_name,facet.field:end_station_name}}}'
 {code}
 This overwrote the value of facet.field with the last seen/parsed value i.e. 
 there was only one value in the end. This is expected as that's noggit's 
 behavior i.e.  doesn't complain and just overwrites the previous value with 
 the same key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-7059) Using paramset with multi-valued keys leads to a 500

2015-01-29 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296564#comment-14296564
 ] 

ASF subversion and git services commented on SOLR-7059:
---

Commit 1655547 from [~noble.paul] in branch 'dev/branches/lucene_solr_5_0'
[ https://svn.apache.org/r1655547 ]

SOLR-7059: Using paramset with multi-valued keys leads to a 500. SolrParams 
need an aray instead of a list

 Using paramset with multi-valued keys leads to a 500
 

 Key: SOLR-7059
 URL: https://issues.apache.org/jira/browse/SOLR-7059
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.0
Reporter: Anshum Gupta
Assignee: Noble Paul

 Here's my use case:
 I wanted to use param-sets to have {{facet.field=field1facet.field=field2}}
 For the same, here is what I updated:
 {code}
 curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d 
 '{
   update : { 
 facets : {
   facet.field:[start_station_name,end_station_name]
 }
   }
 }'
 {code}
 When I tried to use the same, I got a 500.
 After looking at the code, seems like, RequestParams uses MapSolrParams, 
 which banks on MapString,String map.
 This would need to change to support the multi-values.
 I also tried sending:
 {code}
 solr-5.0.0-SNAPSHOT  curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d '{update : { facets : 
 {facet.field:start_station_name,facet.field:end_station_name}}}'
 {code}
 This overwrote the value of facet.field with the last seen/parsed value i.e. 
 there was only one value in the end. This is expected as that's noggit's 
 behavior i.e.  doesn't complain and just overwrites the previous value with 
 the same key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-7059) Using paramset with multi-valued keys leads to a 500

2015-01-29 Thread yuanyun.cn (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1429#comment-1429
 ] 

yuanyun.cn commented on SOLR-7059:
--

Hi, 
The change works, but it's kind of weird now:
the value type of map in MapSolrParams is declared as String, but now the value 
can actually be string or string[].
protected final MapString,String map;

The following code would be kind of weird and difficult to maintain: 
in get method: as the map is MapString,String , so map.get should return 
string - but not in this case, as the value can be string or string[]..
Object  o = map.get(name); /
if (o instanceof String) return  (String) o;
if (o instanceof String[]) { }

in toString: the val is declared as object - not as string(the entry is 
EntryString,String), because the value can be string or string[].
for (Map.EntryString,String entry : map.entrySet()) {
  String key = entry.getKey();
  Object val = entry.getValue(); 
}

This breaks java generic and compiler check, make it harder to maintain.
We should open one new JIRA to refactor MapSolrParams: Maybe change 
MapString,String to MapString,String[] just as ModifiableSolrParams.
Also in Lucene/Solr, we still use raw collectio - not parameterized, we should 
consider refactor it a bit to make the code cleaner.

 Using paramset with multi-valued keys leads to a 500
 

 Key: SOLR-7059
 URL: https://issues.apache.org/jira/browse/SOLR-7059
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.0
Reporter: Anshum Gupta
Assignee: Noble Paul
 Fix For: 5.0, Trunk, 5.1


 Here's my use case:
 I wanted to use param-sets to have {{facet.field=field1facet.field=field2}}
 For the same, here is what I updated:
 {code}
 curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d 
 '{
   set : { 
 facets : {
   facet.field:[start_station_name,end_station_name]
 }
   }
 }'
 {code}
 When I tried to use the same, I got a 500.
 After looking at the code, seems like, RequestParams uses MapSolrParams, 
 which banks on MapString,String map.
 This would need to change to support the multi-values.
 I also tried sending:
 {code}
 solr-5.0.0-SNAPSHOT  curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d '{update : { facets : 
 {facet.field:start_station_name,facet.field:end_station_name}}}'
 {code}
 This overwrote the value of facet.field with the last seen/parsed value i.e. 
 there was only one value in the end. This is expected as that's noggit's 
 behavior i.e.  doesn't complain and just overwrites the previous value with 
 the same key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-7059) Using paramset with multi-valued keys leads to a 500

2015-01-28 Thread Anshum Gupta (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296440#comment-14296440
 ] 

Anshum Gupta commented on SOLR-7059:


If this doesn't really affect anything other than paramSets, which is a new 
feature, we should fix this (if we're able to, before 6640 is resolved).

 Using paramset with multi-valued keys leads to a 500
 

 Key: SOLR-7059
 URL: https://issues.apache.org/jira/browse/SOLR-7059
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.0
Reporter: Anshum Gupta

 Here's my use case:
 I wanted to use param-sets to have {{facet.field=field1facet.field=field2}}
 For the same, here is what I updated:
 {code}
 curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d 
 '{
   update : { 
 facets : {
   facet.field:[start_station_name,end_station_name]
 }
   }
 }'
 {code}
 When I tried to use the same, I got a 500.
 After looking at the code, seems like, RequestParams uses MapSolrParams, 
 which banks on MapString,String map.
 This would need to change to support the multi-values.
 I also tried sending:
 {code}
 solr-5.0.0-SNAPSHOT  curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d '{update : { facets : 
 {facet.field:start_station_name,facet.field:end_station_name}}}'
 {code}
 This overwrote the value of facet.field with the last seen/parsed value i.e. 
 there was only one value in the end. This is expected as that's noggit's 
 behavior i.e.  doesn't complain and just overwrites the previous value with 
 the same key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-7059) Using paramset with multi-valued keys leads to a 500

2015-01-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296532#comment-14296532
 ] 

ASF subversion and git services commented on SOLR-7059:
---

Commit 1655542 from [~noble.paul] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1655542 ]

SOLR-7059: Using paramset with multi-valued keys leads to a 500. SolrParams 
need an aray instead of a list

 Using paramset with multi-valued keys leads to a 500
 

 Key: SOLR-7059
 URL: https://issues.apache.org/jira/browse/SOLR-7059
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.0
Reporter: Anshum Gupta
Assignee: Noble Paul

 Here's my use case:
 I wanted to use param-sets to have {{facet.field=field1facet.field=field2}}
 For the same, here is what I updated:
 {code}
 curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d 
 '{
   update : { 
 facets : {
   facet.field:[start_station_name,end_station_name]
 }
   }
 }'
 {code}
 When I tried to use the same, I got a 500.
 After looking at the code, seems like, RequestParams uses MapSolrParams, 
 which banks on MapString,String map.
 This would need to change to support the multi-values.
 I also tried sending:
 {code}
 solr-5.0.0-SNAPSHOT  curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d '{update : { facets : 
 {facet.field:start_station_name,facet.field:end_station_name}}}'
 {code}
 This overwrote the value of facet.field with the last seen/parsed value i.e. 
 there was only one value in the end. This is expected as that's noggit's 
 behavior i.e.  doesn't complain and just overwrites the previous value with 
 the same key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-7059) Using paramset with multi-valued keys leads to a 500

2015-01-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14296526#comment-14296526
 ] 

ASF subversion and git services commented on SOLR-7059:
---

Commit 1655541 from [~noble.paul] in branch 'dev/trunk'
[ https://svn.apache.org/r1655541 ]

SOLR-7059: Using paramset with multi-valued keys leads to a 500. SolrParams 
need an aray instead of a list

 Using paramset with multi-valued keys leads to a 500
 

 Key: SOLR-7059
 URL: https://issues.apache.org/jira/browse/SOLR-7059
 Project: Solr
  Issue Type: Bug
Affects Versions: 5.0
Reporter: Anshum Gupta
Assignee: Noble Paul

 Here's my use case:
 I wanted to use param-sets to have {{facet.field=field1facet.field=field2}}
 For the same, here is what I updated:
 {code}
 curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d 
 '{
   update : { 
 facets : {
   facet.field:[start_station_name,end_station_name]
 }
   }
 }'
 {code}
 When I tried to use the same, I got a 500.
 After looking at the code, seems like, RequestParams uses MapSolrParams, 
 which banks on MapString,String map.
 This would need to change to support the multi-values.
 I also tried sending:
 {code}
 solr-5.0.0-SNAPSHOT  curl http://localhost:8983/solr/bike/config/params -H 
 'Content-type:application/json' -d '{update : { facets : 
 {facet.field:start_station_name,facet.field:end_station_name}}}'
 {code}
 This overwrote the value of facet.field with the last seen/parsed value i.e. 
 there was only one value in the end. This is expected as that's noggit's 
 behavior i.e.  doesn't complain and just overwrites the previous value with 
 the same key.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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