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
2
votes
1 answer

Solr (solarium) connection with laravel 5 in database.php

I use laravel 5 and want to connect to solr 5 with it. I downloaded solarium using composer. But when i try to connect it gives an error. What works In my controller (just for now) i did this: public function __construct() { $config = array( …
user5512902
  • 473
  • 1
  • 4
  • 12
2
votes
1 answer

solarium add filter query on multiple fields with OR operator

I'm new in Solr search, Can anyone help me to add multiple fields OR condition I got solutions in solr but I can't implement this in solarium. I have fields 1. name 2. username 3. email I want to convert this in Solarium filter query like I use…
Lakhwinder Singh
  • 5,536
  • 5
  • 27
  • 52
2
votes
1 answer

Solr dismax: How to specify a field to make a search with the parameter 'qs'?

I would to ask if someone knows how to specify a field using 'qs' parameter. I mean, for example, a have a document with this fields and content id: 1 name: Football keywords: football, goal, goalkeeper phrase_keywords: premier league, champions…
Zuljin
  • 85
  • 7
2
votes
3 answers

basic full text search with solarium

Just trying out Solr in combination with Solarium for a search form on a website. I would like to search for a combination of words like "word1 word2 word3" in all columns, and get results sorted by the highest search score. I successfully…
Jeroen
  • 1,991
  • 2
  • 16
  • 32
2
votes
1 answer

More like this doesn't give expected results

I'm implementing a solr more like this handler to find similar customers. I have 2 customers, with different names that live on the same address. I want to give an entity_id to solr and get all clients with similar names / addresses back. The client…
Botchcake
  • 21
  • 1
2
votes
1 answer

Solr HTTP error: Unauthorized (401)

I have an application and I've used Solarium for Solr. I have the configuration file: public function getConfig() { return array( 'adapteroptions' => array( 'host' => '127.0.0.1', 'port' => 8983, …
Andreea
  • 139
  • 12
2
votes
3 answers

Solr spellcheck suggestions always return 0 as # of hits

I am using SOLR's spellcheck component to get suggestions and expected the Hits part to return a number of hits from the new words but it returns zero hits in all cases: { "spellcheck":{ "suggestions":[ "pho", { …
Toon Van Dooren
  • 613
  • 1
  • 12
  • 27
2
votes
0 answers

How to use Solr synonyms.txt for query?

This is the first time I am using synonyms in solr and have been reading about it to try and understand how to work with it. Though there are a lot of documentations on the synonym factory and how it works, i couldn't find much on how to get…
abhilashLenka
  • 101
  • 1
  • 12
2
votes
3 answers

Unable to DELETE all documents in Solr4

I have a Solr 4 index that I want to delete all its documents. Attempt…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
2
votes
0 answers

Symfony2 Solarium Class 'Solarium_Plugin_Abstract' not found

I am using https://github.com/nelmio/NelmioSolariumBundle and I am trying to conect with solarium y my symfony2 application. I have installed solarium with the composer.json but then I get Class 'Solarium_Plugin_Abstract' not found in…
nasy
  • 549
  • 2
  • 9
  • 18
2
votes
1 answer

Apache Solr Escape Query

I'm using Apache Solr with Solarium client library for PHP. The problem is special character, a dash (-). When I have a dash in my search query, I don't get any matches. I tried to solve this by using Solarium_Query_Helper::escapeTerm(). But I…
umpirsky
  • 9,902
  • 13
  • 71
  • 96
1
vote
0 answers

SOLR or Query does not combine filters

Ive 5 Entries like following spitze 1 spitze 2 spitze 3 spritze 1 spritze 2 Results are like following &q=spitze~&defType=edismax spitze 1 spitze 2 spitze 3 spritze 1 spritze 2 &q=*spitze*&defType=edismax spitze 1 spitze 2 spitze…
lvollmer
  • 1,418
  • 2
  • 13
  • 32
1
vote
1 answer

SOLR boost query with contain syntax

in my solr call i want to boost all queries that have the word "mobile" in the longtext. My call looks like this: &q=*my_query*&defType=edismax&qf=xtitleLow_stringS^20++xartnumLow_stringS&ps=2&bq=xtitleLow_stringS:(*mobile*)^40 when i use the Boost…
lvollmer
  • 1,418
  • 2
  • 13
  • 32
1
vote
1 answer

SOLR Query with multible fields to search for

i've build a query in solr that looks like this: https://local.solr.com/solr/select?omitHeader=true&wt=json&json.nl=flat&q=*:*&fq=xtitleLow_stringS:*1002*+OR+xartnumLow_stringS:*1002* I want to search in solr with the query "1002" for results. I…
lvollmer
  • 1,418
  • 2
  • 13
  • 32
1
vote
0 answers

How to connect to SOLR Cloud Cluster in a Zookeeper Ensemble via PHP

we are trying to connect to a solr 8.11 Cluster which is handled by a zookeeper ensemble from a php application. we can't absolutly no documentation for solarium how we can connect to a solr cloud cluster, but we found things like…
Elytscha Smith
  • 1,351
  • 1
  • 7
  • 11
1
2
3
10 11