Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Elasticsearch DSL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public
Elasticsearch DSL
Commits
c3bab416
Commit
c3bab416
authored
9 years ago
by
Aivaras Gotovskis
Browse files
Options
Downloads
Patches
Plain Diff
Add regexp query doc.
parent
b116ebf6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/Query/Regexp.md
+30
-0
30 additions, 0 deletions
docs/Query/Regexp.md
docs/Query/index.md
+1
-0
1 addition, 0 deletions
docs/Query/index.md
with
31 additions
and
0 deletions
docs/Query/Regexp.md
0 → 100644
+
30
−
0
View file @
c3bab416
# Regexp Query
> More info about regexp query is in the [official elasticsearch docs][1]
The regexp query allows you to use regular expression term queries.
## Simple example
```
JSON
{
"filter": {
"regexp":{
"name.first" : "s.*y"
}
}
}
```
And now the query via DSL:
```
php
$regexpQuery
=
new
RegexpQuery
(
'name.first'
,
's.*y'
);
$search
=
new
Search
();
$search
->
addQuery
(
$regexpQuery
);
$queryArray
=
$search
->
toArray
();
```
[
1
]:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html
This diff is collapsed.
Click to expand it.
docs/Query/index.md
+
1
−
0
View file @
c3bab416
...
@@ -49,6 +49,7 @@ For more information how to combine search queries take a look at [How to search
...
@@ -49,6 +49,7 @@ For more information how to combine search queries take a look at [How to search
-
[
Prefix
](
Prefix.md
)
-
[
Prefix
](
Prefix.md
)
-
[
Query string
](
QueryString.md
)
-
[
Query string
](
QueryString.md
)
-
[
Range
](
Range.md
)
-
[
Range
](
Range.md
)
-
[
Regexp
](
Regexp.md
)
-
[
Simple query string
](
SimpleQueryString.md
)
-
[
Simple query string
](
SimpleQueryString.md
)
-
[
Term
](
Term.md
)
-
[
Term
](
Term.md
)
-
[
Terms
](
Terms.md
)
-
[
Terms
](
Terms.md
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment