Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bf226020
authored
Dec 10, 2020
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改分片数量为1
1 parent
4b035ef8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
src/main/java/com/viontech/match/service/PoolService.java
src/main/java/com/viontech/match/service/PoolService.java
View file @
bf22602
...
@@ -16,6 +16,7 @@ import org.elasticsearch.client.*;
...
@@ -16,6 +16,7 @@ import org.elasticsearch.client.*;
import
org.elasticsearch.client.indices.CreateIndexRequest
;
import
org.elasticsearch.client.indices.CreateIndexRequest
;
import
org.elasticsearch.client.indices.CreateIndexResponse
;
import
org.elasticsearch.client.indices.CreateIndexResponse
;
import
org.elasticsearch.client.indices.GetIndexRequest
;
import
org.elasticsearch.client.indices.GetIndexRequest
;
import
org.elasticsearch.common.settings.Settings
;
import
org.elasticsearch.common.xcontent.XContentBuilder
;
import
org.elasticsearch.common.xcontent.XContentBuilder
;
import
org.elasticsearch.common.xcontent.XContentFactory
;
import
org.elasticsearch.common.xcontent.XContentFactory
;
import
org.elasticsearch.rest.RestStatus
;
import
org.elasticsearch.rest.RestStatus
;
...
@@ -56,6 +57,10 @@ public class PoolService {
...
@@ -56,6 +57,10 @@ public class PoolService {
CreateIndexRequest
createIndexRequest
=
new
CreateIndexRequest
(
poolId
);
CreateIndexRequest
createIndexRequest
=
new
CreateIndexRequest
(
poolId
);
XContentBuilder
builder
=
getCreateIndexContentBuilder
();
XContentBuilder
builder
=
getCreateIndexContentBuilder
();
createIndexRequest
.
mapping
(
builder
);
createIndexRequest
.
mapping
(
builder
);
Settings
.
Builder
setting
=
Settings
.
builder
();
setting
.
put
(
"index.number_of_shards"
,
1
);
setting
.
put
(
"index.number_of_replicas"
,
0
);
createIndexRequest
.
settings
(
setting
);
CreateIndexResponse
createIndexResponse
=
client
.
indices
().
create
(
createIndexRequest
,
RequestOptions
.
DEFAULT
);
CreateIndexResponse
createIndexResponse
=
client
.
indices
().
create
(
createIndexRequest
,
RequestOptions
.
DEFAULT
);
List
<
Person
>
personPool
=
requestVo
.
getPersonPool
();
List
<
Person
>
personPool
=
requestVo
.
getPersonPool
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment