search for: search_term

Displaying 20 results from an estimated 25 matches for "search_term".

2006 Jul 07
4
Help installing Ferret
http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails I followed everything here but at the last I get when loading page get_results Can only handle a String or a Query. RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/models/result.rb:27:in `search_each'' #{RAILS_ROOT}/app/models/result.rb:27:in `search_index''
2006 Mar 15
4
ActiveRecord::RecordNotFound in search results act_as Ferret
...e set up my model "Branch" to act as ferret using the code below. acts_as_ferret :options => {:fields => [''name'', ''body_text'', ''address'']} I''ve also set up a ferret_controller with the code below def find if params[:search_terms] @branch_results = Branch.find_by_contents(params[:search_terms]) render_text @branch_results.inspect end end I''ve done some updates and the index files seem to be being generated ok. If I go to mywebapp/ferret/find?search_terms=gamston where "gamston" is the name o...
2006 Oct 16
10
Sorting by score
Hi I think this is a very easy question but here goes: I want to sort my results by a boolean field and then by score, I thought this would be a default configuration but apparently not. sort_fields = [] sort_fields << Ferret::Search::SortField.new(:sponsored, :reverse => :true) that is my current code, how do iu alter it so that the results are then sorted by highest score first?
2006 Feb 06
9
tests fine, but fail under rake
...es, 0 errors However when I run rake I get this: 2) Error: test_search(StoryCommentsControllerTest): ActionView::TemplateError: Couldn''t find Story without an ID AND (status = ''approved'') On line #2 of app/views/story_comments/list.rhtml 1: <%unless params.has_key?(:search_terms)%> 2: <%= render_component(:controller => ''stories'', :action => ''show'',:id => params[:id], :params=>{:context=>''small''})%> 3: <%else%> Now the weird thing is, it that this line 2 of list.rhtml shouldn''t...
2007 Nov 04
3
Searching different fields based on document permissions
I''m currently writing a system that stores user-created documents. Each user belongs to a specific group, and the system supports multiple groups. The thing is, my users want to be able to hide pieces of a document from other groups. So for example, lets say Joe of team A has written this document: "Hello all, our secret plan is finally complete! <private>We will begin
2007 May 22
1
Bug in Ferret::Search::SortField::SCORE ??
i have been trying to get this to work for a while now. my controller is sort = [ Ferret::Search::SortField::SCORE_REV ] @results = Record.multi_search(params[:search_terms], [ Link, Post, Event ], {:limit => :all, :sort => sort }) and in my view i just render a conglomeration of the appropriate partials for each model. it seems that no matter what i do, i can''t get the results to be ordered by their ferret_score, even though i can display that score...
2014 Apr 13
2
Adding an external library to Xapian
I am working in Ubuntu 12.04. I have tried re-configuring the source tree too. Removing the destructor stops the error messages for the destructor but the constructor's error persist. ERROR: http://pastebin.com/r0wYNfEs On Sun, Apr 13, 2014 at 10:56 PM, James Aylett <james-xapian at tartarus.org>wrote: > On 13 Apr 2014, at 17:49, Siddhant Mutha <siddhantmutha at gmail.com>
2007 Nov 09
2
Problem with stemming and AAF
...:analyzer => StemmedAnalyzer.new ) Straight forward, no errors. But also no results. Searching for chairs returns only results for that word, not chair or chairs. I know the actual analyzer works, as when I explicity call it as follows, it returns the correct root words to the log files: search_terms = StemmedAnalyzer.new.token_stream(nil, params[:query]) while token = search_terms.next puts token end Like so: Search for "chairs tables" returns token["chair":0:6:1] token["tabl":7:13:1] but the front end throws up on me with a: TypeError (wrong argument type DR...
2014 Apr 13
2
Adding an external library to Xapian
It is there: https://github.com/sidmutha/xapian/blob/master/xapian-core/api/Makefile.mk#L53 On an other note, I'm trying to run ./bootstrap from the cloned repo. But it gives an error saying "unknown option -C" followed by "Bootstrap failed". *Siddhant Mutha* Undergraduate Student Department of Computer Science and Engineering IIT Madras Chennai
2006 Aug 12
0
How do I pass query from from to the controller?
Hi I need to pass a query string for a search to a controller from the view. View: <%= start_form_tag(:action => ''get_results'') %> <%= text_field ''search'', ''search_term'' %> <%= submit_tag "Search" %> <%= end_form_tag %> Controller: def get_results(query) @results = Advert.find(:all, :conditions => "title = ''#{query}'' OR description '...
2024 Sep 03
0
Goodreader: Scrape and Analyze 'Goodreads' Book Data
...s a toolkit for scraping and analyzing book data from Goodreads. Users can search for books, scrape detailed information and reviews, perform sentiment analysis on reviews, and conduct topic modeling. Here?s a quick overview of how to use Goodreader: # Search for books AI_df <- search_goodreads(search_term = "artificial intelligence", search_in = "title", num_books = 10, sort_by = "ratings") # Retrieve Book IDs and save them to a text file get_book_ids(input_data = AI_df, file_name = "AI_books.txt") # Get book-related information scrape_books(book_ids_path =...
2024 Sep 03
0
Goodreader: Scrape and Analyze 'Goodreads' Book Data
...s a toolkit for scraping and analyzing book data from Goodreads. Users can search for books, scrape detailed information and reviews, perform sentiment analysis on reviews, and conduct topic modeling. Here?s a quick overview of how to use Goodreader: # Search for books AI_df <- search_goodreads(search_term = "artificial intelligence", search_in = "title", num_books = 10, sort_by = "ratings") # Retrieve Book IDs and save them to a text file get_book_ids(input_data = AI_df, file_name = "AI_books.txt") # Get book-related information scrape_books(book_ids_path =...
2006 May 16
0
strange partial error
I''m getting this weird partial problem. I''m calling the partial like so: <%= render :partial => partial, :locals => {:message => message, :display => display, :indent => indent, :button_type => button, :terms => params[:search_terms]} %> The object in message can be printed out first, and then within the partial I can access it, and it returns false to message.nil? but when I try to access elements like message.title from within the partial template itself I get errors like this: You have a nil object when you didn'&...
2006 Apr 23
0
Pagination issue because of join
My current code is like this: query = "desc_uf like ''%" + session[:search_term] + "%''" @event_pages, @events = paginate :events, :per_page => 10 ,:conditions => query ,:order => "start_date DESC" This query is made against table ''EVENTS'' and everything works fine. Now the query gets complex. I need to make a jo...
2006 Nov 04
0
Ez_where question
Hi there I''m playing with the ez_where plugin but am having trouble formulating a query. Let''s say that if my params[:search_terms] come back as "Ruby Rails", then I want to search for all books that have Ruby and/or Rails in the title. So how best to set up my ez_where conditions so that book.title is LIKE %Ruby% and also LIKE %Rails% ? Any clues appreciated. Richard
2014 Apr 13
2
Adding an external library to Xapian
...t getting that error. From the top of xapian-core, can you type: > > nm -C .libs/libxapian.so|grep Trie > > and tell me what the output is please? Mine looks like this: > > user at ubuntu:~/build/xapian-core$ nm -C .libs/libxapian.so|grep Trie > 00000000000846fc T Xapian::Trie::search_term(std::string) > 00000000000844aa T Xapian::Trie::add_term(std::string) > 0000000000084490 T Xapian::Trie::Trie() > 0000000000084490 T Xapian::Trie::Trie() > > I currently don't believe you are running with --enable-maintainer-mode, > because that places a -Werror in the link co...
2006 Apr 05
5
duplicate search results
i''m using Ferret 0.9.0 with acts_as_ferret (the one from svn.jkraemer.net), and i''m getting duplicate results, as described in this thread: http://rubyforge.org/pipermail/ferret-talk/2005-December/000048.html is there a way to configure the indexes created by acts_as_ferret to use :key => :id, as described in that thread? i''ve poked around in the code, and had
2007 May 30
1
QueryParser prefixing terms when stemming?
...wing code results in this output "Xapian::Query(pet:(pos=1))". my $qp = new Search::Xapian::QueryParser; $qp->set_stemmer(new Search::Xapian::Stem('english')); $qp->set_default_op(OP_AND); $qp->set_stemming_strategy(STEM_SOME); warn $qp->parse_query($search_term); In version 1.0.0.0, the same code results in "Xapian::Query(Zpet: (pos=1))". The result is no matches, even though the term pet exists. If I use STEM_NONE, the output is the same as the output from 0.9.9.1 and there are matches. It seems like the Z is a prefix, but since I'...
2014 Apr 13
2
Adding an external library to Xapian
...if ((*it)->value == term[i]) { > curr_node = *it; > break; > } else if(it + 1 == curr_node->children.end() || > @@ -55,10 +55,10 @@ Trie::add_term(std::string term) { > bool > Trie::search_term(std::string term) { > struct trie_node *curr_node = &root; > - for (int i = 0; i < term.size(); ++i) { > + for (unsigned int i = 0; i < term.size(); ++i) { > for (vector<trie_node *>::iterator it = > curr_node->children.begi >...
2006 Jun 19
6
SQL Search Qustion
I am working on writing a search method where a user can type a string of words and I return all the objects that have fields that match all of the words in one or a combination of fields. Person first_name last_name Pet name Person has_many :pets I want to write some SQL so that if I search for "Tony AAAA" I will get all the people who have Tony and AAA either in their