1

我是 Redissearch-php 的新手,我想使用 redis 搜索引擎 (php) 在 redis 上执行查询搜索。我已经尝试过此链接中的示例:http ://www.ethanhann.com/redisearch-php/searching/ ,但它总是返回空数组,请在此处查找代码示例,

    $document = $bookIndex->makeDocument();

    $document->title->setValue('How to be awesome.');
    $document->author->setValue('Jack');
    $document->price->setValue(9.99);
    $document->stock->setValue(9);

    $bookIndex->add($document);
    return $bookIndex->search('How')->getCount();

有人可以告诉我,我在这里做错了什么吗?

4

0 回答 0