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
0
votes
0 answers

Soalrium PHP Extract query setFile()

I am using Solarium library for Solr and I am getting files from database in blob format and I want to send them to solr cell using extract query. However, the setFile() method in the Extract Query expects a local file path as input, but I want to…
0
votes
0 answers

How to tell SOLR not to match IDs in a field

I have a filter query to return all the records matching an id in a field $query->createFilterQuery('categoryId')->setQuery( sprintf('categoryId:(%s)', implode(' OR ', $categoryId)) ); this works. But how can I match everything that doesn't have…
user3174311
  • 1,714
  • 5
  • 28
  • 66
0
votes
0 answers

SOLR Fuzzy search for part of words

first of all i've no rights to edit the schema because the client uses a hosted solr. i try to finde the following word: Coagulometerröhrchen with this query: &q=(röhrchen~)&defType=edismax When i try to use the query like…
lvollmer
  • 1,418
  • 2
  • 13
  • 32
0
votes
0 answers

custom handler with solarium suggester

I am trying to use Soalarium suggester with custom handler. This is my php code: $client = SolrClient::create(); $query = $client->createSuggester(); $query->setHandler("suggest_custom"); $query->setQuery("store"); $rq =…
sanjihan
  • 5,592
  • 11
  • 54
  • 119
0
votes
0 answers

Solr/Solarium unique fieldvalue count

I'm using the Solarium PHP library to connect to a SOLR instance. I have an index with around 3.5 mio documents. Searching and filtering works great, but I have one thing that just doesn't seem to work quite well with SOLR. The documents describe…
Frank
  • 530
  • 5
  • 15
0
votes
2 answers

TypeError for Argument 2 in Solarium Client

I'm trying to start a client using Search_api_solr v4.1, Solarium v6.0 and symfony/event-dispatcher v3.4.47 but I keep getting a TypeError. TypeError: Argument 2 passed to Solarium\Core\Client\Client::__construct() must be an instance of…
user3717206
  • 75
  • 1
  • 1
  • 5
0
votes
0 answers

Solr full-text search

I have these entries in the DB: 1:{ first_name:"david", last_name:"cohen" } 2:{ first_name:"david king", last_name:"cohen" } The search logic that is required is a complete-word match: searching for "david ki" - will return null searching…
lior r
  • 2,220
  • 7
  • 43
  • 80
0
votes
0 answers

SOLR Search, Solarium PHP - Understanding the Scoring

I'm trying to get in different ways the SOLR documents scored and it's working almost fine: for example by title, description and type. To confirm this, I'm using the Debug Mode from SOLR, to get additional debugging information. My wish would be,…
A. M.
  • 1
0
votes
0 answers

Solr Sort by Title using solarium

I try to sort by title ascending using solr and Solarium. I do this $query->addSort('title', $query::SORT_ASC); But it returns 500 whereas this $query->addSort('itcreation_dateem_id', $query::SORT_ASC); succeeds. How is it possible to do the…
0
votes
0 answers

maxScore returned as NaN

Using Solarium 5.1.0 I'm creating the following query : select?omitHeader=true&wt=json&json.nl=flat&q=%2A%3A%2A&start=0&rows=10&fl=%2A%2Cscore&group=true&group.query=category_id%3A149&group.query=category_id%3A151 Query works and…
Eric Hz
  • 55
  • 5
0
votes
1 answer

How do I create a single-value field in Solr/Solarium?

I've done a vanilla install of Solr and Solarium for PHP Solarium 5.x PHP 7.1 Solr 8.5.1 I can create and query documents. But all fields I create are returned as arrays - except for "id". obviously there is some schema somewhere that specifies…
Boice
  • 156
  • 1
  • 7
0
votes
1 answer

Error in using Solr to add data - Solr HTTP error: OK (409)(HttpException )

I am trying this out for quite a time now, I have even googled a lot. I am getting this error while trying to add data into Solr using Solarium in Laravel, (1/1) HttpException Solr HTTP error: OK…
userbloom
  • 153
  • 1
  • 11
0
votes
0 answers

How to change the core on the fly while querying in laravel solarium

How to change the core on the fly while querying in laravel solarium. Let suppose I have three cores and I want to call all three cores in laravel solarium. ex: The below file is my config and controller file. Config File : return [ 'endpoint'…
0
votes
1 answer

How to create solr document with String type using solarium query

I' creating solr document via solarium plugin in php. But the all document is stored text_general data type except id field. text_general is the default datatype in solr system. My doubt is why id field is only to stored string type as default.…
CreativeMinds
  • 333
  • 3
  • 22
0
votes
1 answer

How to handle solr disconnection in codeigniter

I implement search functionalities with the help of solr via solarium in CodeIgniter. I'm starting my website without solr connection (i.e. If the solr connection is stopped), My website throws the below warning message, An uncaught Exception was…
CreativeMinds
  • 333
  • 3
  • 22