sasori sasori - 1 year ago 119
PHP Question

how to select multiple values in solr via the query string?

let's say for example i need to search for a number of ids, and by looking at the solr/admin page, at the "Make a Query" input form, there is a


how am I gonna search a multiple value if it only works with one query whenever I fire the search button ?

I tried


it didn't work..but this single query, works


Answer Source

Please check out the SolrQuerySyntax page on the Solr wiki for some examples of the query syntax for Solr.

Given your example you could query for this in a couple of ways:

  1. id:[1 TO 4]
  2. (id:1 OR id:2 OR id:3 OR id:4)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download