Skip to content

Commit 18d0f3a

Browse files
committed
Fix indexer querying wrong column
1 parent cb05620 commit 18d0f3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/indexer/conversations/db/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (i *Indexer) Search(ctx context.Context, options *internal.SearchOptions) (
6262
cond = builder.Or(
6363
db.BuildCaseInsensitiveLike("conversation.name", options.Keyword),
6464
db.BuildCaseInsensitiveLike("conversation.content", options.Keyword),
65-
builder.In("conversation.id", builder.Select("conversation_id").
65+
builder.In("conversation.id", builder.Select("id").
6666
From("comment").
6767
Where(builder.And(
6868
builder.Eq{"type": conversation_model.CommentTypeComment},

modules/indexer/conversations/indexer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func searchConversationByID(t *testing.T) {
173173
{
174174
// NOTE: This tests no filtering
175175
opts: *ToSearchOptions("", &conversations.ConversationsOptions{}),
176-
expectedIDs: []int64{22, 21, 16, 15, 14, 13, 12, 11, 20, 5, 19, 18, 10, 7, 4, 9, 8, 3, 2},
176+
expectedIDs: []int64{22, 21, 17, 16, 15, 14, 13, 12, 11, 20, 6, 5, 19, 18, 10, 7, 4, 9, 8, 3, 2, 1},
177177
},
178178
}
179179

0 commit comments

Comments
 (0)