mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: tokenize words with dots correctly
hello.world is now tokenized as "hello.world" and "world" that way the word "world" will find the post with "hello.world"
This commit is contained in:
@ -540,6 +540,11 @@ describe Search do
|
||||
|
||||
end
|
||||
|
||||
it 'can tokenize dots' do
|
||||
post = Fabricate(:post, raw: 'Will.2000 Will.Bob.Bill...')
|
||||
expect(Search.execute('bill').posts.map(&:id)).to eq([post.id])
|
||||
end
|
||||
|
||||
it 'supports category slug and tags' do
|
||||
# main category
|
||||
category = Fabricate(:category, name: 'category 24', slug: 'category-24')
|
||||
|
Reference in New Issue
Block a user