Displaying 20 results from an estimated 1828 matches for "phrase".
Did you mean:
phase
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...
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 ur...
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...
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...
2006 Dec 07
8
crash on repeated search
...collector:
$ ruby rw_ferret_test.rb
.......rw_ferret_test.rb:20: [BUG] rb_gc_mark(): unknown data type
0x28(0x402ba3a4) non object
ruby 1.8.2 (2005-04-11) [i386-linux]
Aborted
Here''s the code:
require ''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 &...
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:
{"jim"=>"", "_&quo...
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...
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 "reduc...
2011 Mar 10
1
phrase search highlighting
Hi
Some of my users are very "conservative" as it seems :)
The complained about "not finding anything useful", because the
highlighted sample
was wrongly colored when doing phrase search, e.g. "some word".
So they refused to use web search at all and keep telephoning around.
Not the found phrase was highlighted in one color, but all locations
of these words within the sample in different colors.
"This result is wrong" was their complaint when looking at...
2010 Jan 19
1
QueryParser: aliases and OP_AND
...appear in the Mset.
So my questions: is the current QueryParser's behaviour the intended one? Is there anything I can do to get the result I expect?
Of course, the parsing is fine when default_op is OP_OR (as it is by default), but results are also "strange for me" if I try with OP_PHRASE:
Xapian::Query(((AUT1:john:(pos=1) PHRASE 2 AUT1:smith:(pos=2)) OR (AUT2:john:(pos=1) PHRASE 2 AUT1:smith:(pos=2)) OR (AUT2:john:(pos=1) PHRASE 2 AUT2:smith:(pos=2)) OR (AUT1:john:(pos=1) PHRASE 2 AUT2:smith:(pos=2))))
i.e :(AUT1:john PHRASE AUT1:smith) OR (AUT2:john PHRASE AUT1:smith) OR (AUT2:j...
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 following solution -
openssl rsa -in...
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+...
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
Quoti...
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])
@number_match = @results
render(:layout => false)
end
--
Po...
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()
>>> qp.set_default_op(Query.OP_PHRASE)
>...
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'')...
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_...
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 name:search~0.4 AND
name:engine~0.4'')
This isn''t exactly the same as fuzzy search on...