Displaying 13 results from an estimated 13 matches for "queryfilter".
Did you mean:
query_filter
2007 Aug 23
4
scoring problem in acts_as_ferret
Hi,
I am using acts_as_ferret and have a problem with scoring. I would like
to organize it in such way that, if any of the searched terms fits, I
get 1.0 score as a result. I will explain it on the example.
I have in index:
a) "one two three four"
b) "one two three"
c) "one two"
d) "one"
When I search for "one" I would like to get 1.0 score for
2006 May 31
5
Help with sorting arrays with objects in it
I have to build an array through both activerecord and also through a ferret
index.
I was hoping to find a way of sorting the array as i combine the two so
def advanced_search(search_text, store, format, sortby)
# find items in ferret index
items = Item.find_by_contents(search_text)
# and now find all the items from a certain store or category
items_from_sql = Item.find_by_sql("SELECT *
2006 Jul 10
11
Category Number Results returned
I am looking to have a number of categories populated from my results of
a search. For example, searching on "sport" would display all results
for sport. I want to also have a number of categories to refine the
documents down. So by clicking on the "Fishing" category or the
"Shooting" category, I would only see the results on sport around that
category.
Now for
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
...ection'',''sale_category'',''sale_type'',''outcode'']
def VoObject.refine_search(search_input)
bq = BooleanQuery.new
bq.add_query(TermQuery.new(Term.new("section", search_input),
BooleanClause::Occur::Should))
filter = QueryFilter.new(bq)
@vobjects = Item.find_by_contents(search_text,:filter => filter,
:sort => ["section", "sale_category"])
redirect_to :results
end
############ I get this ##############
ruby script/console
Loading development environment.
>> VoObject.refine_search(...
2006 Aug 04
1
incorrect checksum for freed object?
I''m using ferret (0.9.4) in rails, but outside of the "acts_as_ferret"
plugin. Whenever I use a QueryFilter (even a very simple one), the server
will crash after one, two, or three reloads of a page (same page, same
query, same filter). It''s very non-deterministic and I can''t seem to
reproduce it outside of my application environment (I can''t get it to fail
in my unit tests)....
2006 Jul 14
3
Whitespace Issues
I am trying to build up a filtered search using the logic below.
bq = Ferret::Search::BooleanQuery.new
bq.add_query(Ferret::Search::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)),
Ferret::Search::BooleanClause::Occur::MUST)
filter = Ferret::Search::QueryFilter.new(bq)
@vobjects = VoObject.find_by_contents(search_input,:filter =>
filter, :sort => ["section", "sale_category"])
This works fine when the "section" is a single word like "book" but when
there is white spaces in the query like "paperbac...
2006 Jul 14
18
adding a custom filter to the query
Hi all,
I''m trying to figure out how to add a filter into a search. I''ve
created the filter, basically copying the location filter from
http://blog.tourb.us/archives/ferret-and-location-based-searches. But
when I try to call Index.search and pass the filter in a hash with the
key :filter, I get back that it is expecting type Data, and so I''m at
a loss to figure out
2006 Sep 11
1
Using a datefilter with caching
...ith 200 000+ documents and I want to run a few
thousand alerts (basically stored searches) on only a small portion of
the index (documents added the last hour).
Is datefilter the best solution for the situation described above?
I assumed that the datefilter would be cached in the same way as a
QueryFilter. But as far as I can tell from my tests that isn''t the
case... I read an example in the "Lucene in action"-book that seemed to
suggest to use a CachingWrapperFilter in combination with a DateFilter
to get the benefits of caching. How is this done in Ferret?
I''m using...
2007 May 10
13
Is there a way to do incremental search?
Say the user first enters "ruby" for search and gets 1000 results. Then
he can search "rails" just in the 1000 results just returned.
The common scenario is some kind of advanced search. User can
incrementally add criteria and the program will narrow the results step
by step.
I know that at least I can use all the criteria as a whole to do the
searching, but this is a waste
2006 Dec 01
1
Effective search when knowing ID
...ex << {: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}"
highlights = index.highlight(co...
2006 Sep 07
7
counting occurences of words in the result set
Hello, I need to be able to count the occurences of certain terms in the
reults.
Currently my setup is Ferret 0.10.1 aaf bleeding edge.
results = VoObject.find_by_contents(query,:offset=>page, :limit=>
20,:sort => sort_fields)
I use results.total_hits for pagination. This all works really nicely.
However i need to be able to know how many occurences of certain
predefined terms occur
2005 Dec 02
43
ANN: acts_as_ferret
Hi all
This week I have worked with Rails and Ferret to test Ferrets (and Lucenes)
capabilities. I decided to make a mixin for ActiveRecord as it seemed the
simplest possible solution and I ended up making this into a plugin.
For more info on Ferret see:
http://ferret.davebalmain.com/trac/
The plugin is functional but could easily be refined. Anyway I want to share it
with you. Regard it as a
2005 Dec 02
43
ANN: acts_as_ferret
Hi all
This week I have worked with Rails and Ferret to test Ferrets (and Lucenes)
capabilities. I decided to make a mixin for ActiveRecord as it seemed the
simplest possible solution and I ended up making this into a plugin.
For more info on Ferret see:
http://ferret.davebalmain.com/trac/
The plugin is functional but could easily be refined. Anyway I want to share it
with you. Regard it as a