search for: phrases

Displaying 20 results from an estimated 1829 matches for "phrases".

Did you mean: phrase
2006 Apr 29
2
Seeing performance problems with has_many :through relation
...r some insight from some of the more experienced with has_many :through relationships as I am having a hard time reconciling the performance I am seeing. I have 2 tables that are linked together via has_many :through Table 1: urls ( there are about 7,000 records ) 2 fields, id and url Table 2: phrases ( there are about 87,000 records ) 2 fields, id and phrase (w/ an index defined on phrase) A given url can be associated w/ many phrases and a given phrase can be associated with many urls. Table 3: relations ( there are about 235,000 records ) id, url_id, phrase_id and isrel (int) w/ an index c...
2006 Apr 24
9
Confusion with expressing many to many relationship
...the process of converting an existing non-rails application to rails, and am not sure what the best approach would be for specifying the relationship between the two sets of data. I''ll describe the existing table structures first. Table 1: Urls Each url has a unique id and two lists of Phrases, these are currently setup as varchars with "," delimitation - so each url has many Phrases. Table 2: Phrases Each phrase has a unique id and two lists of urls, each url list is setup as a varchar containing a "," delimited list of urls ids - so each phrase also has many url...
2006 Apr 28
9
Q: Timing of render :update in an action ?
...set me straight with a solution to an issue that has come up involving the timing of rendered page elements in relation to the completion of an action''s execution. I have an ror search app which searches through two tables consisting of 7,000 page urls and a table w/ 87,000 related keyphrases within those pages. Search results can take anywhere from 2 seconds to 5-8 seconds to be displayed so I am trying to break the process up so a loading/progress mesg can be displayed using Ajax and the following logic-flow. Search button is pressed search action sets session data to '...
2008 Oct 28
3
Backwards N+1 problem
Hey, i’m running into an N+1 problem, but i don''t exactly know how to :include in this situation. (controller code is at the bottom). I''m trying to find all of the highest ranked definitions, and then render their associated phrases. A Phrase has many definitions. A Definition has many children I already have all the info i need stored in @definitions, so this should only require one SQL call, but unfortunately this line: @Phrases << definition.phrase(:include => [:definitions => :children]) Doesn’t actually w...
2011 Jul 11
36
has_many and belongs_to association
Hi , I want to test the one below but I got the problem belongs_to :name, :class_name => "Phrase", :foreign_key => "name" in my test context "test"do should have_many :phrases end in language.rb belongs_to :name, :class_name => "Phrase", :foreign_key => "name" error is 1) Failure: test: check has_many and belongs_to association should have many languages. (PhraseTest) [/usr/local/lib/ruby/gems/1.9.1/gems/ shoulda-2.11.3/lib/shoulda/cont...
2006 Dec 07
8
crash on repeated search
...''rubygems'' require ''ferret'' include Ferret def phrase(num) "a_fairly_long_phrase%05d"%num end LOOPS=(ARGV[1]||40).to_i _fields = Index::FieldInfos.new _fields.add_field :phrase, :term_vector => :no, :store => :no, :index => :untokenized $phrases=I.new(:field_infos=>_fields) phrase(0).upto(phrase(LOOPS)){|phrase| $phrases << {:phrase=> phrase} } @phrases=Ferret::Search::Searcher.new $phrases.reader count=0 loop{ @phrases.search( Search::TermQuery.new(:phrase, "a_fairly_long_phrase%05d"%rand(LOOPS+1))...
2009 May 09
41
updating the db 6000 times will take few minutes ?
i am writing a test program for ActiveRecord, and it reads a document which is like 6000 words long. And then i just tally up the words by recordWord = Word.find_by_s(word); if (recordWord.nil?) recordWord = Word.new recordWord.s = word end if recordWord.count.nil? recordWord.count = 1 else recordWord.count += 1 end recordWord.save and so this
2005 Nov 09
3
AJAX form Parameters jumbled.
Sorry for the repost but I originally posted this as a response to another thread. I have a text field called ''phrase'' but the parameter values always come up as nil and when I check the parameters dumped in the error message I do not get the normal hash you''d expect. Instead of something like {"phrase"=>"jim"} I get:
2006 May 31
1
Phrase Query vs AND Query? Why don't these find the same things?
PHRASE QUERY Xapian::Query((MBOX:12345678-1234-1234-1234-1234567890ab AND (LP:backup:(pos=1) PHRASE 6 LP:c::(pos=2) PHRASE 6 LP:program files:(pos=3) PHRASE 6 LP:Mozilla Firefox:(pos=4) PHRASE 6 LP:res:(pos=5) PHRASE 6 LP: table-add-column-after-hover.gif:(pos=6)))) AND QUERY Xapian::Query((MBOX:12345678-1234-1234-1234-1234567890ab AND LP:backup:(pos=1) AND LP:c::(pos=2) AND LP:program
2008 May 12
1
Using StemFilter with PhraseQuery
Hi, I''m having difficulty getting the StemFilter and PhraseQuery to work properly together. When I use a StemFilter with a PhraseQuery, searches only work if the phrase consists of stems. For example, the search phrase "reduces health care" will not work but the phrase "reduce health care" will work even though the exact text "reduces health care" is
2011 Mar 10
1
phrase search highlighting
...y: <!-- highlight only if Query does not contain PHRASE --> $if{$eq{$substr{$query,0,1},"},$field{sample},$highlight{$field{sample},$terms}}$if{$field{sample},...} (works only if the phrase is the first term, but that 99.9% the case) If time permits please adjust omega highlighting for phrases. My time is currently very limited unfortunately. -- Reini Urban http://phpwiki.org/? ? ? ? ?? http://murbreak.at/
2010 Jan 19
1
QueryParser: aliases and OP_AND
Hello, I'm wondering about how the QueryParser parses a query containing an "alias" when the default operator is OP_AND (by "alias", I mean a search field mapped to multiple term prefixes). With the following php code : <?php $parser=new XapianQueryParser(); $parser->set_default_op(XapianQuery::OP_AND); $parser->add_prefix('alias', 'AUT1:');
2009 Apr 03
2
Apache SSL key pass phrase question
I just set up a secure server. Followed the godaddy instructions for key generation/installation - and the server wanted my pass phrase to start. When I started developing I followed instructions for a self signed cert and everything went dandy. Anyway - after a little googling and an uneasy feeling that I messed up and godaddy might charge me a fee to resubmit for a new cert, I found the
2006 Mar 29
2
AAH lost my IVR phrases
...l times and After Hours times. It worked fine. I then went to the AMP Maintenance window, Config Edit, got the "phpconfig for Asterisk PBX" page, and selected the extensions_additional.conf page. On this page were the entries for the Normal and After Hours greetings. The initial greeting phrases were expressed in terms of statements like: "exten => s,n,Background(custom/aa_num)". It was easy to extend the greeting (for instance, "Office hours are 7-7", "Press pound for directory"..) by directly adding more canned phrases, like so: "exten => s, n+1...
2011 Sep 30
1
Slow phrase performance
I've been getting excellent performance out of xapian but when searches on phrases of common terms such as [ "north america" ] or [ "art history" ] get run it will take a very long time to come up with results. Examples: ------------------------------ [ south africa ] -- 10379 results found in ~.2 sec [ white house ] -- 17988 results found in <1 sec Quotin...
2006 Jun 07
5
little Live search problem
Works fine but when you use backspace or delete on the search word and it hits 0 characters it displays ALL the Test names in the database! def live_search @phrase = request.raw_post || request.query_string a1 = "%" a2 = "%" @searchphrase = a1 + @phrase + a2 @results = Test.find(:all, :conditions => [ "test_name LIKE ?", @searchphrase])
2011 Jul 14
1
'phrase' default-op mixed with hyphenated words
Hi all, I've come across an issue caused when I try to set the query parser's default op to OP_PHRASE: Xapian raises an Unimplemented Error if the query contains hyphenated words or other terms that implicitly generate a phrase. This can be shown with the following Python extract: >>> from xapian import * >>> qp = QueryParser() >>>
2010 Jun 26
0
change parameters to periodically_call_remote
Hi, I have a search box (id=:phrase) on my rails ajax page. I want a periodically call remote poller to update a div whenever the value in that box changes. On the page containing the search box, I have the following: <%= periodically_call_remote(:url => update_query_topics_url, :with => "$(''phrase'').serialize()", :frequency => 1.0)%> I have also
2006 Apr 15
2
ez_where : i''m puzzled
I have the following code: condition_clause = "%#{@phrase}%" logger.info "condition is #{condition_clause}" unless @phrase.nil? condition = Caboose::EZ::Condition.new :affiliates do affiliate_name =~ "%#{@phrase}%" # <<< here''s the problem end options[:conditions] = condition.to_sql logger.info "ajax
2005 Dec 14
4
Fuzzy search on a phrase
I''m trying to use Ferret to do fuzzy searches. If I use fuzzy search for just one word, it works fine: index.search(''name:gogle~0.4'') However, if I try to use a phrase, it doesn''t work: index.search(''name:"gogle search engine"~0.4'') On the other hand, I could do: index.search(''name:gogle~0.4 AND