similar to: Sorting Search results

Displaying 20 results from an estimated 5000 matches similar to: "Sorting Search results"

2006 Jul 31
16
Sorting performance
I''m using acts_as_ferret to index one of my rails models. Right after I start the app the first request that orders by some ferret field will take very long. Subsequent ones seem to be fast. I guess some caching is going on. Any tips on solving this? Pedro.
2006 May 05
3
Sorting by score
I''m trying to sort by score but it seems like SortField::SortType::SCORE is 0 instead of a SortType. A test case is attached. Without the C extensions the test passes, so I guess it''s a bug in them. Should I be using it without the extensions? Because if that''s the case I have some other bugs to report. Greetings, Pedro C?rte-Real -------------- next part
2006 Aug 01
8
Problem importing lots of records
I run a script that imports a few thousand records into the database. The script runs once for each of several XML files. What it does is parse the XML and for each element of a certain type creates a record in a rails database that gets indexed with acts_as_ferret. This worked fine before but today after a few files (70000 records) this started to happen for any file I tried:
2006 Aug 18
1
Portuguese Stemming
Today while compiling ferret I noticed there was a Portuguese stemmer being compiled. How do I enable it''s use for my index? Pedro.
2006 May 09
1
Reverse sorts by score
The docs for Sort.new say: reverse: pass true if you want the sort order to be reversed. Only works if you pass the field names. Does this mean it''s not possible to do a reverse sort by score? If it is it seems to be broken as I don''t seem to be able to reverse the order of the sort. I''ll write a test case if this is not a known problem. Greetings, Pedro.
2006 Apr 20
1
Creating my own analyzer
I created this analyzer: class DescriptionAnalyzer < Ferret::Analysis::Analyzer def token_stream(field, string) if field == "code" return CodeTokenStream.new(string) else return Ferret::Analysis::Analyzer.new.token_stream(field,string) end end end and created an IndexWriter with it: Ferret::Index::IndexWriter.new(get_index_path,
2006 Apr 27
1
Ferret crashing Ruby
I''ve gotten several problems with C ferret crashing ruby. Here''s the stack trace of my latest case: #0 0x00000050 in ?? () #1 0xb74028ab in iw_close (iw=0x8685a40) at index_rw.c:947 #2 0xb7414359 in index_destroy (self=0x829ebc0) at ind.c:89 #3 0xb73f00bc in frt_ind_free (p=0x829ebc0) at r_search.c:1564 #4 0xb7f04dca in rb_gc_call_finalizer_at_exit () from
2006 Jun 29
13
find_by_contents not returning SearchResults?
The acts_as_ferret documentation says find_by_content returns an instance of SearchResults, but I see this error when I try to use the results. undefined method `total_hits'' for []:Array Here is the link to the documentation: http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000010 But here is the actual code: result =
2009 Aug 14
1
Embed R, and provide a function to user scripts
Hello, I'm not sure how to go about this. Suppose I have a function SEXP boo(SEXP x){ //do something } Also, I have an executable which embeds R in itself. I would like to provide a R function to user code to call that calls 'boo' e.g ##user supplied expression that is given to me x<-1 boo(x) One way is to create a library with function boo that performs .Call to boo, but is
2017 Oct 25
1
Finding the entry point function in a LLVM IR
Thank You David and Mats for the reply, The reason I need to know that main is the entry point is as follows : I have a dead code elimination pass that removes the function call for boo. boo was initially called from the main function , but since the return in the main function has no dependency on boo, boo function call is removed. Now I want to remove the function definition of the functions
2008 May 29
2
creating library
Hi, I'm able to create a library with R CMD INSTALL cmd, etc... I'm just wondering.. is it possible that when the user says library(boo), it runs some initialization code? I have a dumb R file that is: print(2) boo <- function(x){} when I R CMD INSTALL the library, I'm able to see 2 in my unix console.. but when I do library(boo) in R afterwards.. I don't see
2002 Dec 05
1
writing to gzfile: segmentation fault (PR#2347)
Full_Name: Vadim Ogranovich Version: Version 1.6.0 (2002-10-01) OS: Red Hat 7.1 Submission from: (NULL) (209.99.241.1) The following sequence of commands crashes my R session. The first weirdness happens after the second command that appears not to change the "foo.gz" file, no error generated. > con <- gzfile("foo.gz", open="w"); cat("goo\n",
2009 Jun 22
2
negation in grep
Does anybody know how to negate a string in a grep command, i.e., what I need is to return only strings that do NOT contain a second string anywhere in the entire string. for txt <- c("boo","goo","doob","foo","boofoo") I need a grep command that returns strings with "oo" except when "b" is present anywhere. I know that
2007 Feb 13
2
Matrix manipulation
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c("YOO1", "YOO2", "YOO3") # ie # YOO1 YOO2 YOO3 #[1,] 1 2 4 HELLO <- NULL HELLO$YOO1="BOO" HELLO$YOO2="BOO" HELLO$YOO3="HOO" and I want a matrix that will sum my categorization.. how can I do it efficiently without any loop? #ie BOO HOO
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
I''m trying to test that "static" pages (they''re ERB, but get cached), generated through rails, don''t render any stray flash notices left over by the authentication system (Devise) or wherever else. I''ve tried writing this controller spec, but it appears that response.body only renders the template, not its layouts? describe "so that static
2010 Jan 11
1
Problem with S4 generic function print
First, if I have an S4 class boo should I define S3 method for printing print.boo(..) or should I define S4 method print(..). I mainly need to define print function only because some user might call it and then I would like to dispatch the call to right function instead. Second, it seems that by defining S4 generic function print, it is possible to break argument hinting on the status bar.
2008 Oct 16
1
apply, t-test and p-values
R 2.7.2 Windows XP I am using apply to compute a series of Student's t-test from two matrices, sample1 and sample2. boo<-apply(sample1,1,t.test,sample2) I want to pick of the p-values from the tests, but can't seem to get it to work. I have tried several methods to get the values including: boo<-apply(sample1,1,t.test$t.test,sample2) boo<-apply(sample1,1,t.test,sample2)$t.test
2006 Feb 17
7
Rich Text Editor (RTE)
Hello, We are developing an commercial application that need to use an RTE. Someone know one RTE editor that can I use in an commercial application? We need basic functions to format paragrapher, bold, italic, ... I found FCKEditor but it is very expensive and weight. I found this list too but don''t know what is trustful: http://www.geniisoft.com/showcase.nsf/WebEditors Some
2008 Mar 18
1
Merb and Javascript template system
I''ve tryed to use the same logic in html layouts to handle javascript files without success. All I need is not repeat javascript code in various erb templates that have 90% of identical code. - I can''t use more than 1 js file. - If isn''t a way to do this like erb can do in html, what''s the best way to "include" a file in another using Merb? -- from
2006 Sep 22
2
Searching untokenized fields
Hi .. I tried to exclude certain objects from my search, by adding appropriate term queries .. i = Ferret::Index::Index.new i.field_infos.add_field(:type, :index => :untokenized, :term_vector => :no) i << {:type => "Movie", :name => "Indiana" } i << {:type => "Movie", :name => "Forrest" } i << {:type =>