-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: set PositionIncrementAttribute to fix indexing "ictclas_index…
…" and skip wrong position token
- Loading branch information
1 parent
1e7b802
commit 3df28bb
Showing
3 changed files
with
82 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/yamlRestTest/resources/rest-api-spec/test/analysis_ictclas/10_token.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
"Search": | ||
"List Text": | ||
- do: | ||
indices.analyze: | ||
body: | ||
|
30 changes: 30 additions & 0 deletions
30
src/yamlRestTest/resources/rest-api-spec/test/analysis_ictclas/20_bulk.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
"Bulk": | ||
- do: | ||
indices.create: | ||
index: test_index | ||
body: | ||
mappings: | ||
properties: | ||
text: | ||
type: text | ||
analyzer: ictclas_index | ||
- do: | ||
bulk: | ||
refresh: true | ||
body: | ||
- '{"index": {"_index": "test_index", "_id": "test_id"}}' | ||
- '{ "text": "国务院办公厅转发商务部" }' | ||
- '{"index": {"_index": "test_index", "_id": "test_id2"}}' | ||
- '{ "text": "国务院办公厅转发商务部" }' | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{ "text": "国务院办公厅转发商务部" }' | ||
- '{"index": {"_index": "test_index"}}' | ||
- '{ "text": "国务院办公厅转发商务部" }' | ||
- match: | ||
errors: false | ||
- do: | ||
count: | ||
index: test_index | ||
|
||
- match: { count: 4 } |