You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Antoine Tissier (JIRA)" <ji...@apache.org> on 2008/11/11 19:15:44 UTC
[jira] Created: (SOLR-848) The search method cannot manager several
values for a single parameter
The search method cannot manager several values for a single parameter
----------------------------------------------------------------------
Key: SOLR-848
URL: https://issues.apache.org/jira/browse/SOLR-848
Project: Solr
Issue Type: Improvement
Components: clients - php
Environment: Any
Reporter: Antoine Tissier
If you look at this wiki page :
http://wiki.apache.org/solr/SimpleFacetParameters
You will notice the url may looks like :
http://localhost:8983/solr/select?q=video&rows=0&facet=true&facet.field=inStock&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*]
Two values for the field facet.query. It can also happen you have several values for the variable facet.field.
Unfortunately, here is the current Apache_Solr_Service::search method
public function search($query, $offset = 0, $limit = 10, $params = array())
{
(...)
$queryString = http_build_query($params, null, $this->_queryStringDelimiter);
(...)
}
$params is an associative array. In my opinion, (tell me if i am wrong), but this way you cannot generate this kind of query.
Regards
Antoine Tissier
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SOLR-848) The search method cannot manager several
values for a single parameter
Posted by "Antoine Tissier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Tissier closed SOLR-848.
--------------------------------
Resolution: Fixed
You're right.
Sorry about that.
Regards
Antoine
> The search method cannot manager several values for a single parameter
> ----------------------------------------------------------------------
>
> Key: SOLR-848
> URL: https://issues.apache.org/jira/browse/SOLR-848
> Project: Solr
> Issue Type: Improvement
> Components: clients - php
> Environment: Any
> Reporter: Antoine Tissier
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> If you look at this wiki page :
> http://wiki.apache.org/solr/SimpleFacetParameters
> You will notice the url may looks like :
> http://localhost:8983/solr/select?q=video&rows=0&facet=true&facet.field=inStock&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*]
> Two values for the field facet.query. It can also happen you have several values for the variable facet.field.
> Unfortunately, here is the current Apache_Solr_Service::search method
> public function search($query, $offset = 0, $limit = 10, $params = array())
> {
> (...)
> $queryString = http_build_query($params, null, $this->_queryStringDelimiter);
> (...)
> }
> $params is an associative array. In my opinion, (tell me if i am wrong), but this way you cannot generate this kind of query.
> Regards
> Antoine Tissier
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-848) The search method cannot manager several
values for a single parameter
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Otis Gospodnetic updated SOLR-848:
----------------------------------
Comment: was deleted
> The search method cannot manager several values for a single parameter
> ----------------------------------------------------------------------
>
> Key: SOLR-848
> URL: https://issues.apache.org/jira/browse/SOLR-848
> Project: Solr
> Issue Type: Improvement
> Components: clients - php
> Environment: Any
> Reporter: Antoine Tissier
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> If you look at this wiki page :
> http://wiki.apache.org/solr/SimpleFacetParameters
> You will notice the url may looks like :
> http://localhost:8983/solr/select?q=video&rows=0&facet=true&facet.field=inStock&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*]
> Two values for the field facet.query. It can also happen you have several values for the variable facet.field.
> Unfortunately, here is the current Apache_Solr_Service::search method
> public function search($query, $offset = 0, $limit = 10, $params = array())
> {
> (...)
> $queryString = http_build_query($params, null, $this->_queryStringDelimiter);
> (...)
> }
> $params is an associative array. In my opinion, (tell me if i am wrong), but this way you cannot generate this kind of query.
> Regards
> Antoine Tissier
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-848) The search method cannot manager
several values for a single parameter
Posted by "Donovan Jimenez (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646624#action_12646624 ]
Donovan Jimenez commented on SOLR-848:
--------------------------------------
Antoine,
Yes, the params argument is an associative array - I felt this was the simplest way to support all the possible arguments that different output writers and searchers can take. This doesn't exclude you from passing multiple values for the same parameter, as in your case. I use http_build_query() but then reformat the query string into what Solr expects. Just pass all "repeat" parameters as arrays of value, Solr will parse each set of related values in order (ie. facet.field and facet.query).
- Donovan
> The search method cannot manager several values for a single parameter
> ----------------------------------------------------------------------
>
> Key: SOLR-848
> URL: https://issues.apache.org/jira/browse/SOLR-848
> Project: Solr
> Issue Type: Improvement
> Components: clients - php
> Environment: Any
> Reporter: Antoine Tissier
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> If you look at this wiki page :
> http://wiki.apache.org/solr/SimpleFacetParameters
> You will notice the url may looks like :
> http://localhost:8983/solr/select?q=video&rows=0&facet=true&facet.field=inStock&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*]
> Two values for the field facet.query. It can also happen you have several values for the variable facet.field.
> Unfortunately, here is the current Apache_Solr_Service::search method
> public function search($query, $offset = 0, $limit = 10, $params = array())
> {
> (...)
> $queryString = http_build_query($params, null, $this->_queryStringDelimiter);
> (...)
> }
> $params is an associative array. In my opinion, (tell me if i am wrong), but this way you cannot generate this kind of query.
> Regards
> Antoine Tissier
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-848) The search method cannot manager
several values for a single parameter
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646618#action_12646618 ]
Otis Gospodnetic commented on SOLR-848:
---------------------------------------
I don't fully follow what you are trying to achieve. Do you mind asking on solr-user list first and we can reopen this issue only once/if we establish there is a bug with Solr?
> The search method cannot manager several values for a single parameter
> ----------------------------------------------------------------------
>
> Key: SOLR-848
> URL: https://issues.apache.org/jira/browse/SOLR-848
> Project: Solr
> Issue Type: Improvement
> Components: clients - php
> Environment: Any
> Reporter: Antoine Tissier
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> If you look at this wiki page :
> http://wiki.apache.org/solr/SimpleFacetParameters
> You will notice the url may looks like :
> http://localhost:8983/solr/select?q=video&rows=0&facet=true&facet.field=inStock&facet.query=price:[*+TO+500]&facet.query=price:[500+TO+*]
> Two values for the field facet.query. It can also happen you have several values for the variable facet.field.
> Unfortunately, here is the current Apache_Solr_Service::search method
> public function search($query, $offset = 0, $limit = 10, $params = array())
> {
> (...)
> $queryString = http_build_query($params, null, $this->_queryStringDelimiter);
> (...)
> }
> $params is an associative array. In my opinion, (tell me if i am wrong), but this way you cannot generate this kind of query.
> Regards
> Antoine Tissier
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.