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

IBX-7418: ContentName search criterion added #2364

Merged
merged 7 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/search/criteria_reference/contentname_criterion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ContentName Criterion

Check warning on line 1 in docs/search/criteria_reference/contentname_criterion.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/search/criteria_reference/contentname_criterion.md#L1

[Ibexa.ReadingLevel] The grade level is 4.65. Aim for 8th grade or lower by using shorter sentences and words.
Raw output
{"message": "[Ibexa.ReadingLevel] The grade level is 4.65. Aim for 8th grade or lower by using shorter sentences and words.", "location": {"path": "docs/search/criteria_reference/contentname_criterion.md", "range": {"start": {"line": 1, "column": 1}}}, "severity": "WARNING"}

The [`ContentName` Search Criterion](https://github.com/ibexa/core/blob/main/src/contracts/Repository/Values/Content/Query/Criterion/ContentName.php)
searches for content by its name.

## Arguments

- `value` - string(s) representing the Content name(s), the wildcard character `*` can be used for partial search.
julitafalcondusza marked this conversation as resolved.
Show resolved Hide resolved

## Example

### PHP

``` php
$query->query = new Criterion\ContentName('*phone');
```

### REST API

=== "XML"

```xml
<Query>
<Filter>
<ContentNameCriterion>*phone</ContentNameCriterion>
</Filter>
</Query>
```

=== "JSON"

```json
"Query": {
"Filter": {
"ContentNameCriterion": "*phone"
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Due to this storage limitation, searching content using the Country Field Type o
|-----|-----|-----|-----|-----|
|[Ancestor](ancestor_criterion.md)|Whether the content item is an ancestor of the provided Location|&#10004; |&#10004; |&#10004; |
|[ContentId](contentid_criterion.md)|Content item's ID|&#10004; |&#10004; |&#10004; |
|[ContentName](contentname_criterion.md)|Content item's name|&#10004; |&#10004; |&#10004; |
|[ContentTypeGroupId](contenttypegroupid_criterion.md)|ID of the content item's content type group|&#10004; |&#10004; |&#10004; |
|[ContentTypeId](contenttypeid_criterion.md)|ID of the content item's content type|&#10004; |&#10004; |&#10004; |
|[ContentTypeIdentifier](contenttypeidentifier_criterion.md)|Identifier of the content item's content type|&#10004; |&#10004; |&#10004; |
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ nav:
- Search Criteria reference: search/criteria_reference/search_criteria_reference.md
- Ancestor: search/criteria_reference/ancestor_criterion.md
- ContentId: search/criteria_reference/contentid_criterion.md
- ContentName: search/criteria_reference/contentname_criterion.md
- ContentTypeGroupId: search/criteria_reference/contenttypegroupid_criterion.md
- ContentTypeId: search/criteria_reference/contenttypeid_criterion.md
- ContentTypeIdentifier: search/criteria_reference/contenttypeidentifier_criterion.md
Expand Down
Loading