定制 pucene/dbal-driver 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pucene/dbal-driver

Composer 安装命令:

composer require pucene/dbal-driver

包简介

Dbal driver for pucene.

README 文档

README

The DbalDriver uses doctrine/dbal to store documents to a relational database.

This is a subtree split of the pucene/pucene project create issues in the main repository.

Usage

<?php

use Doctrine\DBAL\DriverManager;
use Pucene\Analysis\StandardAnalyzer;
use Pucene\DbalDriver\DbalDriverFactory;
use Pucene\Index\PuceneIndexFactory;
use Pucene\SealAdapter\PuceneAdapter;
use Schranz\Search\SEAL\Schema\Index;
use Schranz\Search\SEAL\Schema\Field;

$dbalConnection = DriverManager::getConnection([
    'url' => 'mysql://root@127.0.0.1:3306/pucene?serverVersion=8.0',
]);
$driverFactory = new DbalDriverFactory($dbalConnection);
$driver = $driverFactory->create(new Index('blog', [
    'id' => new Field\IdentifierField('id'),
    'title' => new Field\TextField('title'),
]));

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-30