final class \SmartSolrDb
{
} ->
- Language: PHP
- Located at: modules/smart-extra-libs/lib_db_solr.php
- Package: extralibs:Database:Solr
- Namespace: \
- Class Name: SmartSolrDb
- Throws: Exception : Depending how this class it is constructed it may throw Exception or Raise Fatal Error
- Version: v.20221220
- Depends: extensions: PHP SOLR Client (v.2.0 or later) ; classes: Smart, SmartComponents
- Usage: dynamic object: (new Class())->method() - This class provides only DYNAMIC methods
public function get_ext_version (
) {}
-> STRING
@return: {STRING} Solr extension version
public function findQuery (
string $y_query,
array $y_options = ["mode" => "phrase", "settings" => [], "sort" => [], "filters" => [], "facets" => [], "fields" => [], "boost" => [], "mlt" => []]
) {} -> ARRAY
public function addDocument (
array $arrdoc,
int $use_autocommit = 0
) {} -> INT
public function deleteDocument (
string $id
) {} -> INT
<?php
// Usage example:
//--
$mySolr = new SmartSolrDb();
//--
$data = $mySolr->findQuery(
'word1 word2', // this is a real Solr Query and must be escaped in a proper way using SolrUtils::escapeQueryChars()
[
'settings' => [
'start' => 0, // offset
'rows' => 10, // limit
],
'sort' => [
'score' => -1
],
'filters' => [
'!id' => 'ID1', // not ID1
'category' => 'Some Categ',
'subcategory' => 'Some Sub-Categ'
],
'fields' => [] // all
]
);
//--
// #end php code
documentation generated on: 2023-10-19 23:15:56 +0000
Smart.Framework © 2009-2023 unix-world.org