Skip to content

Commit

Permalink
fix: 修复搜索
Browse files Browse the repository at this point in the history
  • Loading branch information
fuqihao.foliet committed Aug 5, 2023
1 parent 5923952 commit bbf22cf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions biz/infrastructure/mapper/cat/es.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@ func (m *EsMapper) Search(ctx context.Context, communityId, keyword string, skip
Query: &types.Query{
Bool: &types.BoolQuery{
Must: []types.Query{
{
MultiMatch: &types.MultiMatchQuery{
Query: keyword,
Fields: []string{consts.Details, consts.Name + "^5", consts.Area, consts.Color},
},
},
{
Term: map[string]types.TermQuery{
consts.CommunityId: {
Value: communityId,
},
},
MultiMatch: &types.MultiMatchQuery{
Query: keyword,
Fields: []string{consts.Details, consts.Name + "^5", consts.Area, consts.Color},
},
},
},
},
Expand Down

0 comments on commit bbf22cf

Please sign in to comment.