manticoresoftware / manticoresoftware/manticoresearch-php

Metod match('word word2') generate query type AND

Open
#70 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting for reply
Dominant language
PHP
Stars
211
Forks
39
Avg merge
1d 20h
Merged PRs (30d)
1

Description

In documentation OR as default operator
I try profile()->match('word word2') and i see :
[query] => Array
(
[type] => AND
[description] => AND( AND( AND(KEYWORD(word, querypos=1)), AND(KEYWORD(word2, querypos=2))), OR( AND(KEYWORD(word, querypos=1)), AND(KEYWORD(word2, querypos=2))))....

if i set
->math(['query' => 'word word2', 'operator' => 'or'])
has no effect.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the PHP client's profile()->match() entry point and reproduce the documented match('word word2') example with the default operator and with operator set to 'or'. Trace the generated query array and confirm that the completed behavior uses the requested operator rather than producing the duplicated AND structure shown in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.