Skip to content
GitLab
Explore
Sign in
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
bbee2931
Commit
bbee2931
authored
9 years ago
by
Simonas Šerlinskas
Browse files
Options
Downloads
Patches
Plain Diff
added docs index and query index pages
parent
e9bf1914
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/Query/Wildcard.md
+1
-0
1 addition, 0 deletions
docs/Query/Wildcard.md
docs/Query/index.md
+67
-0
67 additions, 0 deletions
docs/Query/index.md
docs/index.md
+16
-0
16 additions, 0 deletions
docs/index.md
with
84 additions
and
0 deletions
docs/Query/Wildcard.md
0 → 100644
+
1
−
0
View file @
bbee2931
# Wildcard Query
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docs/Query/index.md
0 → 100644
+
67
−
0
View file @
bbee2931
# Query
Objective query builder represents all available
[
Elasticsearch queries
][
1
]
.
To form a query you have to create
`Search`
object. See below an example of match all query usage.
```
php
$search
=
new
Search
();
$matchAllQuery
=
new
MatchAllQuery
();
$search
->
addQuery
(
$matchAllQuery
);
$queryArray
=
$search
->
toArray
();
```
```
php
//$queryArray content
'query'
=>
[
'match_all'
=>
\stdClass
(),
]
```
So now you can easily pass it to the elasticsearch-php client:
```
php
//from elasticsearch/elasticsearch package
$client
=
new
Elasticsearch\Client
();
$searchParams
=
[
'index'
=>
'people'
,
'type'
=>
'person'
,
'body'
=>
$queryArray
];
$docs
=
$client
->
search
(
$searchParams
);
```
> This example works with elasticsearch/elasticsearch ~1.0 version.
## Queries:
-
[
Bool
](
Bool.md
)
-
[
Boosting
](
Boosting.md
)
-
[
Common terms
](
CommonTerms.md
)
-
[
Constant Score
](
ConstantScore.md
)
-
[
DisMax
](
DisMax.md
)
-
[
Filtered
](
Filtered.md
)
-
[
Function score
](
FunctionScore.md
)
-
[
Fuzzy
](
Fuzzy.md
)
-
[
Fuzzy like this field
](
FuzzyLikeThisField.md
)
-
[
Fuzzy like this query
](
FuzzyLikeThisQuery.md
)
-
[
Has child
](
HasChild.md
)
-
[
Has parent
](
HasParent.md
)
-
[
Ids
](
Ids.md
)
-
[
Indices
](
Indices.md
)
-
[
Match all
](
MatchAll.md
)
-
[
Match
](
Match.md
)
-
[
More like this
](
MoreLikeThis.md
)
-
[
Multi match
](
MultiMatch.md
)
-
[
Nested
](
Nested.md
)
-
[
Prefix
](
Prefix.md
)
-
[
Query string
](
QueryString.md
)
-
[
Range
](
Range.md
)
-
[
Simple query string
](
SimpleQueryString.md
)
-
[
Term
](
Term.md
)
-
[
Terms
](
Terms.md
)
-
[
Wildcard
](
Wildcard.md
)
[
1
]:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-queries.html
This diff is collapsed.
Click to expand it.
docs/index.md
0 → 100644
+
16
−
0
View file @
bbee2931
# Elasticsearch DSL
Welcome to Elasticsearch DSL library. The main purpose of this library is to provide objective query builder for
[
elasticsearch-php
][
1
]
client.
Everything starts from the
`Search`
object. We recommend first to take a look at the
[
Search
](
How
to/HowToSearch.md) chapter.
### Topics:
-
[
Build Queries
](
Query/index.md
)
-
[Build Filters]
-
[Build Aggregations]
### How to
-
[How to combine
`Filter`
and
`Query`
]
-
[How to add sorting]
[1] https://github.com/elastic/elasticsearch-php
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