Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected result using plain Redis queries in PHP using predis #1454

Open
johnqiuwan opened this issue Apr 18, 2024 · 0 comments
Open

unexpected result using plain Redis queries in PHP using predis #1454

johnqiuwan opened this issue Apr 18, 2024 · 0 comments
Assignees
Labels

Comments

@johnqiuwan
Copy link

Describe the bug
Turn the command

FT.SEARCH idx:product "@product_name_text:eos" RETURN 2 product_name_text category

into

Redis::executeRaw(['FT.SEARCH', $productIndexKey, '@product_name_text:(' . $productName . ')', 'RETURN', '2', 'category', 'product_name_text']) will give null

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'FT.SEARCH idx:product "@product_name_text:eos" RETURN 2 product_name_text category' will give expected result
  2. Run command using Predis
    Redis::executeRaw(['FT.SEARCH', $productIndexKey, '@product_name_text:(' . $productName . ')', 'RETURN', '2', 'FIELDS', 'category', 'product_name_text']) will give null

Expected behavior
Redis::executeRaw(['FT.SEARCH', $productIndexKey, '@product_name_text:(' . $productName . ')', 'RETURN', '2', 'FIELDS', 'category', 'product_name_text']) should give the same result as run the command 'FT.SEARCH idx:product "@product_name_text:eos" RETURN 2 product_name_text category'

Versions (please complete the following information):

  • Predis: [2.2]
  • PHP [8.1]
  • OS [Mac 14.2.1 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants