I have an issue with searching words like "front-end" or "1Z0-803" in my source file. The search doesn't find them although they are indexed.
Let me show you my case. Code:
require 'picky'
data = Picky::Index.new :content do
category :text, partial: Picky::Partial::None.new
end
Document = Struct.new :id, :text
File.open 'story.txt' do |story|
data.add Document.new(1, story.read)
end
text = Picky::Search.new data
text.search('front-end')
The story.txt file is simple:
back-end developer
front-end developer
1Z0-803
---end of file---
When I debug it I see that my file was properly indexed:
@inverted={"back-end"=>[1], "developer"=>[1], "front-end"=>[1], "1z0-803"=>[1]
but when I launch above search, there is no result. The same goes for when I search '1z0-803'.
Thank you in advance for your help!
Cheers, Mat