Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHPORM-275 PHPORM-276 Add Query\Builder::search() and autocomplete() #3232

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

Merged
GromNaN merged 7 commits into mongodb:5.x from GromNaN:PHPORM-275
Jan 6, 2025

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Dec 23, 2024
edited
Loading

Fix PHPORM-275 and PHPORM-276

Checklist

@GromNaN GromNaN changed the title (削除) PHPORM-275 Add Builder::search() (削除ここまで) (追記) PHPORM-275 PHPORM-276 Add Query\Builder::search() and autocomplete() (追記ここまで) Jan 2, 2025
@GromNaN GromNaN marked this pull request as ready for review January 2, 2025 14:38
@GromNaN GromNaN requested a review from a team as a code owner January 2, 2025 14:38
@GromNaN GromNaN requested a review from jmikola January 2, 2025 14:38
?bool $returnStoredSource = null,
?array $tracking = null,
) {
$results = $this->toBase()->search($operator, $index, $highlight, $concurrent, $count, $searchAfter, $searchBefore, $scoreDetails, $sort, $returnStoredSource, $tracking);
Copy link
Member

@jmikola jmikola Jan 2, 2025

Choose a reason for hiding this comment

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

I noted the @method \MongoDB\Laravel\Query\Builder toBase() annotation on this class but I'm failing to see how toBase() actually returns this library's class instead of Illuminate\Database\Query\Builder. I imagine there's some magic or trait involved that isn't clear.

Noted this probably has nothing to do with the PR, so feel free to ignore this complaint.

}

/** @return Collection<string> */
public function autocomplete(string $path, string $query, bool|array $fuzzy = false, string $tokenOrder = 'any'): Collection
Copy link
Member

@jmikola jmikola Jan 2, 2025

Choose a reason for hiding this comment

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

If you're going to document the search() params, it'd probably make sense to do so for these as well. Alternatively, link to https://www.mongodb.com/docs/atlas/atlas-search/autocomplete/ or some other relevant documentation.

Copy link
Member

@jmikola jmikola Jan 3, 2025

Choose a reason for hiding this comment

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

I think this would benefit from a docs link, like you did for search() in Eloquent\Builder.

GromNaN reacted with thumbs up emoji
}

/** @return Collection<string> */
public function autocomplete(string $path, string $query, bool|array $fuzzy = false, string $tokenOrder = 'any'): Collection
Copy link
Member

@jmikola jmikola Jan 3, 2025

Choose a reason for hiding this comment

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

I think this would benefit from a docs link, like you did for search() in Eloquent\Builder.

GromNaN reacted with thumbs up emoji
@GromNaN GromNaN requested a review from jmikola January 3, 2025 18:54
@GromNaN GromNaN enabled auto-merge (squash) January 6, 2025 17:33
@GromNaN GromNaN merged commit d6d8004 into mongodb:5.x Jan 6, 2025
31 of 32 checks passed
@GromNaN GromNaN deleted the PHPORM-275 branch January 8, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jmikola jmikola jmikola approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /