Questions tagged [solarium]

Solarium is an open-source Solr client library and query builder for PHP applications.

Solarium is an open-source client library and query builder for applications.

In some cases, for example, if you want light weight solution to interact with Solr, you may use generic PHP functions such as file_get_contents to get Solr query results and json_decode to get result objects. Of course, if you set wt=json in the query URL supplied to file_get_contents, you will able to deal with it using json_decode.

Useful Links

154 questions
9
votes
2 answers

How to get project or root dir in Symfony 5

I use Symfony 5 and Solarium. I want to get the project dir (or root dir) in my Controller (extends from AbstractController). I saw some anwers with kernel, creating new services, etc.. But, isn't it just a function that call the project dir without…
Brandys
  • 354
  • 1
  • 3
  • 15
5
votes
1 answer

Unable to sort Solr Geospatial search results

How can we have Solr 3.6.1 return the Geospatial search results both filtered by bbox and sorted by distance? I tried appending a &sort=geodist() asc to the URL as stated in the Solr docs, but I get the error: sort param could not be parsed as a…
Nyxynyxx
  • 196
  • 3
  • 9
4
votes
1 answer

Solr search with array of values on field

I'm new in Solr search. Can anyone help me for solr my problem. I have array of values and I want to add this in solr query like $query->setQuery('field:[1,2,5]'); When I'm executing this then I get this error…
Lakhwinder Singh
  • 5,536
  • 5
  • 27
  • 52
3
votes
1 answer

How to configure Solarium to use POST instead of GET Requests

im facing the problem that our uri's sent to solr (jetty) are getting to long, way over 9k bytes which exceeds the default limit by jetty. the solution would be to switch from GET requests to POST requests because we do not want to increase the…
netzding
  • 772
  • 4
  • 21
3
votes
1 answer

accessing apache solr from php with solarium throws UnexpectedValueException

I only just started with Apache Solr and I'm not a huge PHP crack either. Apache Solr is running and pasting this query in the browser shows an XML document: http://localhost:8983/solr/my_test/select?q=name:%22A%20Clash%20of%20Kings%22 However, the…
user3629892
  • 2,960
  • 9
  • 33
  • 64
3
votes
1 answer

Failed connect to 127.0.0.1:8983; Connection refused'

No matter what i do i am always getting "Uncaught exception 'Solarium\Exception\HttpException' with message 'Solr HTTP error: HTTP request failed, Failed connect to 127.0.0.1:8983; Connection refused'" i have installed solarium with composer without…
Nirmesh
  • 305
  • 5
  • 12
3
votes
1 answer

Using solarium in Magento CE

Hi i want to use solarium third party library in magento CE 1.8 . knowing that the solarium library do not conform the naming conventions of magento and zend I want to know how can i integrate solarium or add it features into the autoloader? is that…
Mohamed23gharbi
  • 1,710
  • 23
  • 28
3
votes
1 answer

How do you paginate in solr using solarium?

I am using solrium , a PHP Solr cilent for using Solr with PHP , I am able to use queries like select etc . When I use select i get all only 10 results which is being set to 10 in default configuration in Solr , how do I get all results with…
Neetz
  • 364
  • 5
  • 18
2
votes
0 answers

Solarium user deprecated warning

I have this warning since I use Solarium for my project. Do you know how I can resolve it? User Deprecated: Not passing an instance of AdapterInterface as the first constructor argument is deprecated in Solarium 5.2 and will cause an error in…
Brandys
  • 354
  • 1
  • 3
  • 15
2
votes
0 answers

how to use spellcheck in solarium

I want to use spellcheck in solarium but I'm having trouble working with it I've got the following code from solarium's documentation
Ali Ghaini
  • 882
  • 6
  • 13
2
votes
0 answers

Solr schema - Conflicting wildcards for fields

I am indexing data from MongoDB that roughly looks like { "name": "John Doe", "age": "25", "education": [ { "title": "Masters", "status": 53, "finalProject": { "title":…
Kamran Ahmed
  • 11,809
  • 23
  • 69
  • 101
2
votes
1 answer

Symfony Nelmio Solarium Bundle FilterQuery

When I execute this code in solr API ....fq=title:(bionformatics OR scince)... It works fine and return data that fit to Filter Query. But when I try the same query in Solarium bundle $client = $this->solr->getClient(); $query =…
Stevan Tosic
  • 6,561
  • 10
  • 55
  • 110
2
votes
2 answers

add multiple endpoints of solr unsing solarium

when I add multiple solr server as endpoint and using a single solarium client to fire query on any solr server; I add replication master/slave to solr. for now I taste when the server for onecore(master or slave) is failed the client/solarium must…
MedKostali
  • 223
  • 1
  • 5
  • 16
2
votes
1 answer

Error executing unit testing with laravel to load custom settings file

When I run the service from browser it works, but if i execute the test file i get this error: 1) Api\Domain\Tests\ServiceTest::testSetUp RuntimeException: A facade root has not been…
mstafkmx
  • 419
  • 5
  • 17
2
votes
0 answers

Solarium - curl error - using solr under php 7

I am using Solr 5.4, with its user interface working perfectly. I've installed Solarium to help with the development of my user interface. Although, I am receiving this error when trying to use the example codes: Fatal error: Uncaught…
Evis
  • 571
  • 8
  • 22
1
2 3
10 11