Displaying 1 result from an estimated 1 matches for "id_filt".
Did you mean:
id_file
2006 Dec 01
1
Effective search when knowing ID
...nd text from DB
index << {:pk_fulltext_id => row[''pk_fulltext_id''], :content => row
[''fulltext_text'']}
end
content_query = Search::WildcardQuery.new(:content, "Text*")
# I know the ID of the text to search in so I want to do it efficient
id_filter = Search::QueryFilter.new(Search::TermQuery.new
(''pk_fulltext_id'', ''1257667''))
query = Search::FilteredQuery.new(content_query, id_filter)
index.search_each(query) do |id, score|
puts "Document #{id} found with a score of #{score}"
highlig...