Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr range query for specefic id like /solr/select?q=x:[1,2,5,11,64589]

Tags:

solr

I have some specific id like 1,2,5,11,64589 in solr (int type)

I want to qet query like ttp://localhost:8983/solr/select?q=x:[1,2,5,11,64589] but does not work (get error). how can do it ???

Note: i can implement with "OR" but i want simple way (and other problem limit in max url char length)

like image 565
Hamid Avatar asked Mar 28 '10 17:03

Hamid


1 Answers

These are your options:

  • ?q=x:(1 OR 2 OR 5 OR ...)
  • ?q=x:1 OR x:2 OR x:5 OR ...
  • ?q=x:(1 2 5 ...) with defaultOperator="OR" (haven't tried this one but it should work)
  • Write your own RequestHandler
  • Write your own QueryParser
like image 197
Mauricio Scheffer Avatar answered Oct 04 '22 06:10

Mauricio Scheffer