Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Filtertext #351

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Filtertext #351

wants to merge 2 commits into from

Conversation

m1tYo
Copy link

@m1tYo m1tYo commented Mar 22, 2020

I've added a couple of methods for filtering texts. I needed them for my specific needs, guess someone else might find them useful as well.

Copy link
Collaborator

@iget-esoares iget-esoares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for the created method

* @param string $value
* @return $this
*/
public function whereMatch($field, $value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove this method? It was added and merged in PR #355

* @param array $value
* @return $this
*/
public function whereNotInText($field, $value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it can be renamed to whereNotMatchPhrase to be more specific on which query is made. What your thoughts?

* Exclude results containing text
* Can't use 'term' because it's not analyzed
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html Terms query
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -151,6 +151,44 @@ public function where($field, $value)
return $this;
}

/**
* Exclude results containing text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these comments since it's redundant

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants