Displaying 20 results from an estimated 3000 matches similar to: "bug with boolean query evaluation containing parenthesis and NOT ?"
2009 Sep 10
2
tranform a table?
hello everyone,
i'm new to R, so i hope you dont mind a fairly basic R question. we're
using R to manipulate the results of SQL queries and create an HTML output.
I'm starting with a table that looks essentially like this:
Name Field1 Field2
John value1 value2
Jane value3 value4
My table is stored as a dataframe. I'd like to efficiently produce an
2009 Jan 16
3
rspec model testing - test on user defined validation- How do I test that the create failed.
I''m new to rspec and looking for way to test a validation I added to a model.
The test checks to see that if field1 has a value then field2 must be nil
and vice versa.
-------------------------------
When I did the rspec_scaffold it generated one test which worked
before :each do
@valid_attributes = {
:field1 = "value for field1"
:field2 = "value for
2006 Aug 10
4
I need "validates_presence_of" help
Hi - I have 3 fileds a user can fill out. They can fill out 2 of them or
just one of them, for example.
fill out these 2 fields:
Field1 and Field2
Or fill out this field:
Field3
In my model how do I use validates_presence_of for Field1 and Field2 or
just Field3.
I want to do something like this:
validates_presence_of Field1, Field2
OR
validates_presence_of Field3
So the user can fill out
2006 Sep 22
3
Error with :create => true and existing index
I implemented a "reindex" command which simply creates an IndexWriter
with :create => true for a prexisting index.
The "reindexing" seems to start out ok, with several thousand docs
added, then Ferret throws an exception:
IO Error occured: couldn''t rename file "index\_0.tmp" to "index\_0.cfs":
<File exists>
I guess that _0.cfs is held
2006 Jun 05
6
Ferret Win32 Gem for windows users ...
Hi and thanks for Ferret!
I''m wondering if it would be possible to create a Ferret Win32 gem which
includes the c performance code pre-compiled for those of us without a C
compiler handy ?
Zed Shaw seems to have cracked this particular nut with his Mongrel
Win32 gem.
Alternately, is there a zip of the Win32 .so Ferret needs that I could
download and manually install?
Kind Regards
2006 Jan 13
4
How to add virtual fields in model
I want to add virtual fields in a model.
table: field1 field2
I want to add field3 which is field1*2 + field2
I know tihs can be achieved in View, but I want it in model.
Then I will pass this model to PagerRenderer to paginate.
How to achieve this?
thanks
--
Posted via http://www.ruby-forum.com/.
2008 May 29
2
how to use substring match as condition?
Hi,
How can I use a substring match as a condition in a subset command?
Sth like this:
subset(input, field1=="blah1" & field2=="blah2") # but now with substring
match in field2
subset(input, field1=="blah1" & field3 *substringmatch* "blah3")
I've tried with gsub, but it won't work:
subset(input, field1=="blah1" &
2011 Oct 05
1
Weird behaviour of tab characters in a string in R (vs Python)
Hello,
I wanted to parse some information from a text, where fields are tab
separated.
When I copy the text into an R session (under emacs) like:
mystring <- "field1 field2 field3"
the tab character is replaced by a single space!
For ex, if I type mystring, I get:
"field1 field2 field3"
The tabs have disappeared!!!
I checked with Python that the text I copied was tab
2006 Sep 28
3
A few questions about numbers and dates
Hi,
I just noticed that Ferret seems to convert every field to a string
[ruby code appended for those interested], which has thwarted my attempt
to format Dates (to "dd/mm/yyyy") and Floats (to "n.nn") for consumption
further down the line based on the class of the field stored.
I considered pre-formatting Dates and Floats prior to indexing, which
would store the field
2007 Jul 16
2
Field initialization order bug?
I believe that I may have found a bug in R. The top code sample gives
an error as shown. However, by simply switching which field is
initialized first as in the bottom code sample, it works as expected.
This gives an error:
a <- NULL
a[["field1"]] <- 1
a[["field2"]] <- matrix(c(2,1), 1)
Error in a[["field2"]] <- matrix(c(2, 1), 1) :
more elements
2005 Oct 06
8
accessing extra request parameters
hi all,
how are other people passing and accessing ''get'' parameters from their apps?
what is the best way to do it?
ie:
www.example.com/controller/action/id/extra/extra2/ ??
or
www.example.com/controller/action/id/~extra/extra2/
or what ever....
are there built in methods for passing and accessing extra parameters?
thanks for your suggestions
-felix
2006 Aug 28
12
Help with Multiple Readers, 1 Writer scenario
Hi,
I''m building a web server application using Ferret [thanks so much
Dave], Mongrel and Camping which works fine servicing one request at a
time, but serialises searches if more than one request arrives, so I''d
like some advice please about the best way to use multiple readers and
one writer.
Some background ... query requests which in my case are always read
only, arrive via
2006 Sep 14
2
Possiible Bug ? indexWriter#doc_count countsdeleted docs after #commit
Hi David,
> Deleted documents don''t get deleted until commit is called
Ok, but FYI, my experiments show that #commit doesn''t affect #doc_count,
even across ruby sessions.
On a different note, I''d like to request a variation of #add_document
which returns the doc_id of the document added, as opposed to self.
I''m trying to track down an issue with a large
2007 Mar 05
2
Warming up a new Searcher/Reader (Ferret 0.10.9 win32)
Hi,
I have a largish index [700MB] which is updated from time to time,
requiring me to close and recreate the Ferret::Search::Searcher to use
the latest index.
My problem is that the first few searches on the new index are slow [by
comparison to before the close/recreate], I''m guessing because the new
index is being loaded into RAM by my OS and into Ferret as needed.
I''m
2007 Feb 17
1
Conditional data frame manipulation
Hi all,
My current project brought forth the snippet below, which modifies in each
row of a data frame a certain field depending on another field in the same
row. Dealing with data of some 30000 entries this works, but is horribly
slow. Can anyone show this newbie how to do this properly (faster ;0)?
for (i in 1:nrow(dataframe)){
if
2008 Jan 21
1
sorting in 'merge'
Hello everyone,
I've been advised to use merge to extract information from two
data.frames with a number of common columns, but I cannot get a grasp
on how it sorts the result. With sort=FALSE, I would expect it to give
the result back sorted exactly as the input was but it seems it is not
always the case, especially when there are repeats in the input.
For example:
> a =
2006 Sep 20
8
Understanding boost ?
Hi,
I''m confused about managing field boosting ...
I have set the :boost for the :name field in my docs to 10, via :boost
=> 10
Then I performed a search for ''keith'' over all fields via with
*:(keith*), expecting a doc with Keith in the :name field to come out on
top. But another doc with Keith mentioned in other fields (:comments,
:address) scored higher.
I
2009 Aug 15
4
How to use R to perform prediction based on history data
Say I have a csv file, each row contains several fields, one of them
are whether the row is success.
In history data, I have all the fields including the result of whether
it is success. In future data, I only have fields without the result.
For example:
history data:
Field1 Field2 Field3 Field4 ResultField
1231 CA TRUE 443 TRUE
23231 NC TRUE 123 FALSE
2006 Jun 15
10
Finding out all terms from search results. How?
Hi everybody,
I need to find out all terms (field values) from one of the fields from
a set of documents returned by search.
In other words, I have indexed documents with two fields. I do search on
one field and then want to know all other field''s values from fount
documents.
How?
--
Sergei Serdyuk
Red Leaf Software LLC
web: http://redleafsoft.com
--
Posted via
2006 Sep 15
2
Trouble with "updating" a document
Hi,
I seem to be having trouble updating a doc, ie, deleting then re-adding
to the index.
The following script demonstrates my issue - I''m sure I''m missing
something obvious, but I can''t seem to find the problem. Can someone
point out where I am going wrong please ?
Regards
Neville
===
require ''rubygems''
require ''ferret''
p