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
1
vote
0 answers

How do I increase the timout when initializing Solarium Client in PHP?

I am using Solarium client 3.8.1, and I tried: $config = array( 'endpoint' => array( 'localhost' => array( 'host' => $host, 'port' => $port, 'path' => $solrPath …
Yirmiyahu Fischer
  • 503
  • 2
  • 9
  • 22
1
vote
1 answer

How to filter by date with Solarium

How can I add a clause in php Solarium to filter by date? like omit all the results where date > today. $query = $client->createSelect(); $query->createFilterQuery('myDateField')->setQuery( sprintf('myDateField:%s', /*WHAT TO PUT…
user3174311
  • 1,714
  • 5
  • 28
  • 66
1
vote
1 answer

SOLR Solarium can we use filter-queries with dismax-queries?

i just built a search form backed by solr, we are using the solarium library to construct our requests. we built a "huge" collection of filterqueries like that one: $query =…
netzding
  • 772
  • 4
  • 21
1
vote
1 answer

Using Solarium with Solr

I'm trying to use Solarium (NelmioSolariumBundle) with Solr and I have this error message: Service "solarium.client" not found: even though it exists in the app's container, the container inside "App\Controller\solariumController" is a smaller…
Brandys
  • 354
  • 1
  • 3
  • 15
1
vote
0 answers

Solarium suggester return 0 result

I setup suggester query in solr. I have the following setting, Solar config mySuggester
user10899318
1
vote
0 answers

How to convert SOLR URL into a Solarium query?

I have a SOLR URL like this: select?omitHeader=false&wt=json&json.nl=flat&q=*:*&start=0&rows=240&fl=id,*,score&q.op=AND&df=someField&sort=sorting_field desc&fq=status:(active)&fq=someField:(alfa romeo 159) How can I convert it to a Solarium Query…
JustAC0der
  • 2,871
  • 3
  • 32
  • 35
1
vote
1 answer

Solr: Using wildcard for a term having whitespaces

I am trying to search for a term that has spaces and a wildcard at the end of it; i.e. name:John S* Solr is failing to return any result although I have the below entries indexed and are returned when querying *:* from Solr web interface; John…
Geo Salameh
  • 323
  • 2
  • 8
1
vote
2 answers

Solr Json Facet API using Solarium

I'm Working on a PHP project where I'm using Solarium as my Primary Library for Interfacing with Apache Solr. I'm using Json Facet API of Solr as follows:- json.facet={"unique_docs":"unique(doc_id)","hll_docs":"hll(doc_id)"} How can I use Similar…
1
vote
0 answers

Cassandra + Solr order are not right with few nodes

I'm using Datastax Enterprise with Cassandra + Solr, I've 2 nodes with replication factor of 2 - means all the data is on both servers. I've a problem that when I pull the data from the Solr the order is not right and then I get the same results…
Rafael Mor
  • 626
  • 1
  • 7
  • 21
1
vote
1 answer

HTTP ERROR 404 while accessing /solr/admin/ping. Reason: Not Found in ubuntu 16.04

Installed SOLR 7.3.0 in ubuntu 16.04, i am able to access solr link (http://localhost:8983/solr) in browser. But admin link(http://localhost:8983/solr/admin/ping) are giving 404 error. Permissions given to /var/solr/data, still i have problem.
Naga
  • 41
  • 4
1
vote
1 answer

apache solr 5.3.0 search in multiple core

I am using solr 5.3.0 , I have 6 core. schema of all 6 core is same. now I want to search query in all 6 core at one time. Is there any way to do it? I am using php solarium. It will be really helpful is anyone can share small example code. Thanks…
kailash sharma
  • 356
  • 1
  • 12
1
vote
1 answer

PHP Solarium library with the unified highlighter

Can the PHP Solr client Solarium be used with the Unified highlighter? If so, how? The Solarium documentation doesn't list any ways of using it. Only the older highlighters.
Dude
  • 121
  • 8
1
vote
1 answer

Solarium execute custom query

How can I execute query /solr//schema/fields or any direct uri in Solarium? I found some codes but I don't know how to use them: $request = $client->createRequest($query); $response = $client->executeRequest($request); $result =…
M Sh
  • 429
  • 2
  • 4
  • 11
1
vote
1 answer

Symfony Solarium bundle datetime range

$client = $this->solr->getClient(); $query = $client->createSelect(); $facetSet = $query->getFacetSet(); $facetSet->createFacetField('id')->setField('publication_year'); $facet =…
Stevan Tosic
  • 6,561
  • 10
  • 55
  • 110
1
vote
2 answers

How to use a custom request handler in Solarium

I have set up a request handler /query in solr. Now, when I use this code, it does not work but if I change "query" to "select" it works fine. // create a client instance $client = new Solarium\Client($config); // create a select query…
Chu Hai
  • 69
  • 1
  • 6
1 2
3
10 11