Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
suggest-task
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
田川
suggest-task
Commits
83adf4b7
Commit
83adf4b7
authored
Aug 03, 2022
by
王明范
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8db1aac2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
SuggestTask.java
suggest-task/src/main/java/com/secoo/so/suggest/task/SuggestTask.java
+6
-8
No files found.
suggest-task/src/main/java/com/secoo/so/suggest/task/SuggestTask.java
View file @
83adf4b7
...
@@ -285,6 +285,9 @@ public class SuggestTask {
...
@@ -285,6 +285,9 @@ public class SuggestTask {
for
(
int
i
=
0
;
i
<
keyList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
keyList
.
size
();
i
++)
{
String
word
=
keyList
.
get
(
i
);
String
word
=
keyList
.
get
(
i
);
EsSuggestKeywordInfo
suggestInfo
=
esSuggestKeywordMap
.
get
(
word
);
EsSuggestKeywordInfo
suggestInfo
=
esSuggestKeywordMap
.
get
(
word
);
if
(
suggestInfo
==
null
)
{
continue
;
}
int
wordLen
=
StringUtils
.
getByteLength
(
word
);
int
wordLen
=
StringUtils
.
getByteLength
(
word
);
int
length
=
word
.
length
();
int
length
=
word
.
length
();
if
(
wordLen
>
3
&&
wordLen
<=
18
&&
StringUtils
.
isBlank
(
suggestInfo
.
getSuggestTags
()))
{
if
(
wordLen
>
3
&&
wordLen
<=
18
&&
StringUtils
.
isBlank
(
suggestInfo
.
getSuggestTags
()))
{
...
@@ -297,17 +300,12 @@ public class SuggestTask {
...
@@ -297,17 +300,12 @@ public class SuggestTask {
break
;
break
;
}
}
String
fulWord
=
keyList
.
get
(
j
);
String
fulWord
=
keyList
.
get
(
j
);
int
fulLen
=
StringUtils
.
getByteLength
(
fulWord
)
;
int
rightLen
=
StringUtils
.
getByteLength
(
fulWord
)
-
wordLen
;
if
(
fulWord
.
startsWith
(
word
)
&&
fulLen
-
wordLen
>
3
&&
fulLen
-
word
Len
<=
12
)
{
if
(
fulWord
.
startsWith
(
word
)
&&
rightLen
>
3
&&
right
Len
<=
12
)
{
String
subWord
=
fulWord
.
substring
(
length
,
length
+
1
);
String
subWord
=
fulWord
.
substring
(
length
,
length
+
1
);
String
rightWord
=
fulWord
.
substring
(
length
,
fulWord
.
length
()).
trim
();
if
(
isEN
&&
StringUtils
.
isEnStr
(
subWord
)){
if
(
isEN
&&
StringUtils
.
isEnStr
(
subWord
)){
continue
;
continue
;
}
}
int
rightLen
=
StringUtils
.
getByteLength
(
rightWord
);
if
(
rightLen
-
wordLen
<=
3
||
rightLen
-
wordLen
>
12
)
{
break
;
}
suggestList
.
add
(
esSuggestKeywordMap
.
get
(
fulWord
));
suggestList
.
add
(
esSuggestKeywordMap
.
get
(
fulWord
));
keyCount
++;
keyCount
++;
}
else
{
}
else
{
...
@@ -341,7 +339,7 @@ public class SuggestTask {
...
@@ -341,7 +339,7 @@ public class SuggestTask {
sb
.
append
(
subWord
);
sb
.
append
(
subWord
);
}
}
if
(
sb
.
length
()
>
0
)
{
if
(
sb
.
length
()
>
0
)
{
esSuggestKeywordMap
.
get
(
word
)
.
setSuggestTags
(
sb
.
toString
());
suggestInfo
.
setSuggestTags
(
sb
.
toString
());
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment