[
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.