Re: partial/diff updates?

2008-11-26 Thread Dan
Here is a conversation I had on the IRC channel #couchdb on this subject on
november 24, 2008 (2 days ago). Hope this helps!

(04:01:26 PM) dsimard: I just  wanted to know if an attachment changes, will
the new revision contain just the "diff" with the old attachment or the
complete attachment?
(04:01:49 PM) jan: complete attachment. diffs are the devil
(04:03:08 PM) dsimard: damn... all fields of a document are stored as a full
document?
(04:03:18 PM) dsimard: I really thought that diffs were used
(04:03:35 PM) jan: no, no diffs. diffs are the devil
(04:04:14 PM) dsimard: ok, could you elaborate on the evilness of diffs?
(04:04:44 PM) dsimard: I just want to know more about it
(04:05:04 PM) jan: dsimard: you need to keep diffs around forever to
construct the latest live doc. this totally conflicts with the couchdb
storage model which uses full representations of each revision.
(04:05:04 PM) dsimard: or if you have a good link about it
(04:05:35 PM) jan:
http://incubator.apache.org/couchdb/docs/overview.html
(04:05:36 PM) jan: that one

In my opinion, it would be a great addition to couchdb. But still, I can't
wait to use it on my next project.


On Wed, Nov 26, 2008 at 3:25 PM, Liam Staskawicz <[EMAIL PROTECTED]> wrote:

>
> On Nov 26, 2008, at 12:20 PM, Noah Slater wrote:
>
>  On Wed, Nov 26, 2008 at 09:57:24AM -0800, Liam Staskawicz wrote:
>>
>>> When updating a document, is there any notion of submitting a partial
>>> update?
>>> It seems like being able to specify that only some subset of the fields
>>> in a
>>> document should be updated would offer some efficiency benefits.  I guess
>>> I
>>> had in mind some scenario where CouchDB would create the updated record
>>> by
>>> merging the existing revision with the new info and saving the updated
>>> revision, but I'm still new to CouchDB so I don't have a good sense of
>>> whether
>>> this tramples on any important concepts.
>>>
>>
>> Nope, CouchDB does not support this at the moment. If you want to make an
>> update
>> you have to send the entire document each time.
>>
>> There is some discussion among CouchDB users and developers about the
>> benefits
>> of partial updates but it seems the real sticking point so far is deciding
>> on
>> the mechanism for enabling this. It seems the rough consensus at this
>> point is
>> that whatever method we use be something that is standardised, either
>> through a
>> standards body or de facto within the larger JSON community.
>>
>
> Thanks for the response - and yeah, this is not a sticking point at the
> moment but as systems start to ramp up this seems like a pretty good way to
> make the back and forths much more efficient.   Will be looking forward to
> this being introduced at some point.
>
> Liam
>


code4lib presentation on CouchDB

2008-03-07 Thread Dan Scott
Hello:

A couple of weeks ago, I gave a 20-minute presentation on CouchDB at
the code4lib conference (a collection of library developers and
library geeks). The session was recorded, and the video will be
available from the Internet Archive at some point in the future - but
I thought I would share the slides with the community:
http://coffeecode.net/archives/151-CouchDB-delicious-sacrilege.html

Note that:

1) My background is with relational databases - 8 years with DB2 and
co-authoring a book on Apache Derby - so the "delicious sacrilege" of
the title refers to my encounters with a document database

2) Owing to those 8 years at IBM, I had a whole lot of (mostly bad)
experiences with Notes. But after a few days of playing around with
CouchDB, I'm a believer in its potential for good.

3) I was running CouchDB trunk as of two weeks ago, so I think I got
hit by the API change for attachments and couldn't successfully
retrieve the attachments I was adding to docs. No big deal; I knew
what was going on.

4) I was hoping to have the 200 people in the audience playing with
CouchDB on my laptop during my presentation, but suffered a desktop
crash on the way to the podium which brought down the server. Alas, no
live scalability test :(

I should note that the presentation itself is licensed under a
Creative Commons BY-NC license, should anyone want to reuse or improve
it.

A big thanks to Damian and the rest of the CouchDB developers!

-- 
Dan Scott
Laurentian University


Re: Sphinx license

2008-03-27 Thread Dan Scott
On 26/03/2008, Daniel John Debrunner <[EMAIL PROTECTED]> wrote:
> Nils Adermann wrote:
>  >
>  > Søren Hilmer wrote:
>  >> Hi
>  >>
>  >> Took a quick look at Sphinx, and noticed that it licensed under GPL
>  >> v.2. That is probably a problem for integration into CouchDB, as it is
>  >> not compatiple with Apache v.2.
>  >>
>  >> see: http://www.apache.org/licenses/GPL-compatibility.html
>  >>
>  >> --Søren
>  >>
>  >>
>  > Hi,
>  >
>  > unfortunately Sphinx doesn't make it very clear but it's released under
>  > "either version 2 of the License, or (at your option) any later
>  > version." (as you can read in doc/Sphinx.html under 1.4 License) so you
>  > can just apply the terms of GPLv3 and you should be fine even if it
>  > required linking somewhere.
>
>
> I don't think the issue is that GPLv2 is incompatible with the ALv2,
>  it's that the ASF only distributes software using ALv2. If couchdb pulls
>  in Sphinx then won't that make the combined program also GPL?
>
>  See this draft of the licensing policy:
>
>  http://people.apache.org/~rubys/3party.html
>
>  Dan.
>

This is, perhaps, an incredibly stupid question, but wouldn't
integration with Solr (a sister Apache project for a full-text search
engine built on Lucene that speaks HTTP + JSON
(http://lucene.apache.org/solr/)) make sense as a first target?

-- 
Dan Scott
Laurentian University


Re: code4lib presentation on CouchDB

2008-05-30 Thread Dan Scott
2008/3/7 Dan Scott <[EMAIL PROTECTED]>:
> Hello:
>
> A couple of weeks ago, I gave a 20-minute presentation on CouchDB at
> the code4lib conference (a collection of library developers and
> library geeks). The session was recorded, and the video will be
> available from the Internet Archive at some point in the future - but
> I thought I would share the slides with the community:
> http://coffeecode.net/archives/151-CouchDB-delicious-sacrilege.html

Quick update - the videotaped recording of my presentation is now
available for download or streaming at
http://www.archive.org/details/code4lib.conf.2008.pres.CouchDBsacrilege
should anyone be interested in a slightly out-of-date intro to CouchDB
:)

-- 
Dan Scott
Laurentian University


Re: the search api?

2008-07-20 Thread Dan Reverri
Is it worthwhile to implement a full text indexer on top of couchdbs
map/reduce functionality?

http://wiki.apache.org/couchdb/FullTextIndexWithView


Re: Erlang crash on new install of couchdb

2008-07-21 Thread Dan Reverri
Looks like cypto is not starting correctly. There was a previous thread
about this:
http://www.mail-archive.com/couchdb-user@incubator.apache.org/msg00471.html


On Mon, Jul 21, 2008 at 4:53 PM, John Evans <[EMAIL PROTECTED]> wrote:

> I found the Erlang crash dump viewer web tool and it doesn't even really
> look like it's getting to the point where couchdb is getting loaded.  I ran
> another Erlang app that I have just to make sure that the emulator is
> working in general and it worked just fine.  For lack of any better ideas,
> I'll start exploring the bin/couchdb script and see what I can find, but is
> there anything special going on with the way the emulator is invoked for
> couchdb that might explain why it's bombing before it even gets to couchdb
> code?
>
> Thanks,
> -
> John
>
> On Mon, Jul 21, 2008 at 4:33 PM, John Evans <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
> >
> > I had a nice happy version of couchdb running from the trunk for the past
> > couple of weeks when we encountered a drive failure at our hosting
> provider
> > which required a clean install of the machine.  I was able to restore the
> > entire couchdb directory unharmed, but the OS was a clean install (of
> Ubuntu
> > Hardy), so I had to go through and install all of the dependencies like
> > Erlang.  Well, after getting everything (I think?) i place, I was getting
> > this failure:
> >
> > $ bin/couchdb
> > {"init terminating in
> >
> do_boot",{undef,[{crypto,start,[]},{erl_eval,do_apply,5},{init,start_it,1},{init,start_em,1}]}}
> >
> > Crash dump was written to: erl_crash.dump
> > init terminating in do_boot ()
> >
> > I then remembered that based on one of the previous issues I asked about
> on
> > the mailing list I had previously installed the most recent version of
> > Erlang instead of using the one installed by Ubuntu's apt-get, so I
> thought
> > that may help here and built and installed R12B3 from source.
> >
> > This didn't help, so I thought there must be some other problem with the
> > couchdb installation itself, so I blew it away and did a clean
> build/install
> > from the same checkout of the trunk that I used before but I am still
> > getting the same error.
> >
> > The erl_crash.dump is here:
> > http://dl.getdropbox.com/u/59147/erl_crash.dump
> >
> > Any ideas?  Are there tools for interpreting the crash dump?
> >
> > -
> > John
> >
>


Need to troubleshoot: open_error,-10

2008-07-21 Thread Dan Connelly
Oh Relaxed Ones:

I am doing my first install of CouchDB 0.8.   Installing on OpenSuSE
10.3 (32-bit, i686 athlon i386 GNU/Linux).It is giving me an init
do_boot problem, but nothing I can figure out from the dump.

(Previously, I had installed CouchDB 0.7 on SuSE a Pro 9.2 and got it
running okay.   Not so lucky now.)

The exact error I get is "open_error,-10".   Apparently LD_LIBRARY_PATH
is not set properly.   I built and installed erlang from source
tarball:  otp_src_R12B-2.   I installed the ICU libs (Version 3.6)
using  Yast (yummy stuff).   I built and installed SpiderMonkey, Version
1.7.0.

My LD_LIBRARY_PATH includes the SpiderMonkey lib dir. "icu-config
--invoke" works fine and returns the LD_LIBRARY_PATH with /usr/lib added
(which is where the icu shared objects are installed).

Isn't this sufficient on LD_LIBRARY?   How can I force a verbose
dependency check?

-- Dan Connelly (not yet relaxed)


Re: Need to troubleshoot: open_error,-10

2008-07-21 Thread Dan Reverri
Are you running couchdb as a different user? If so, have you set the
LD_LIBRARY_PATH for this user correctly?

On Mon, Jul 21, 2008 at 6:43 PM, Dan Connelly <[EMAIL PROTECTED]>
wrote:

> Oh Relaxed Ones:
>
> I am doing my first install of CouchDB 0.8.   Installing on OpenSuSE
> 10.3 (32-bit, i686 athlon i386 GNU/Linux).It is giving me an init
> do_boot problem, but nothing I can figure out from the dump.
>
> (Previously, I had installed CouchDB 0.7 on SuSE a Pro 9.2 and got it
> running okay.   Not so lucky now.)
>
> The exact error I get is "open_error,-10".   Apparently LD_LIBRARY_PATH
> is not set properly.   I built and installed erlang from source
> tarball:  otp_src_R12B-2.   I installed the ICU libs (Version 3.6)
> using  Yast (yummy stuff).   I built and installed SpiderMonkey, Version
> 1.7.0.
>
> My LD_LIBRARY_PATH includes the SpiderMonkey lib dir. "icu-config
> --invoke" works fine and returns the LD_LIBRARY_PATH with /usr/lib added
> (which is where the icu shared objects are installed).
>
> Isn't this sufficient on LD_LIBRARY?   How can I force a verbose
> dependency check?
>
>-- Dan Connelly (not yet relaxed)
>


Re: Need to troubleshoot: open_error,-10

2008-07-22 Thread Dan Connelly
Dan Reverri wrote:
> Are you running couchdb as a different user? If so, have you set the
> LD_LIBRARY_PATH for this user correctly?
Hi Dan,

What does "correctly" mean?

Okay, so I am a "different user."   That is, I did not create a couchdb
user.   I did need to change permissions on 2 couchdb directories to
allow group "dev" to write there.   The different user is in group "dev".  

One possible source of my problem is that my architecture is x86_64 but
the OS is 32-bit.  But the architecture is hidden from the build system
and all the objects for Erlang and SpiderMonkey are 32-bit.

The ErrorMessages page (wiki) tells me to run couchdb this way:

LD_LIBRARY_PATH=/usr/local/lib:/usr/local/js/lib couchd
  

THIS NEEDS MORE EXPLANATION IN THE WIKI.  In my case, "/usr/local/lib"
is useless.  What is its intended purpose?The SpiderMonkey set-up is
clear, though.

[EMAIL PROTECTED]:~> ls -l /usr/local/js/lib
total 5156
-rw-r--r-- 1 root root 2748756 2008-07-21 10:08 libjs.a
-rwxr-xr-x 1 root root 2516756 2008-07-21 10:08 libjs.so

[EMAIL PROTECTED]:~> ls -l /usr/local/lib
total 8
drwxr-xr-x 4 root root 4096 2008-07-21 10:24 couchdb
drwxr-xr-x 8 root root 4096 2008-07-20 20:12 erlang

It should not be necessary to pre-set the LD_LIBRARY_PATH for the ICU
shared objects.   The couchdb script uses "icu-config" to put those
shared objects on the LD_LIBRARY_PATH dynamically, within the
invocation. Such a dynamic set-up should be just fine for ICU.

In my case, OpenSuSE comes with ICU already installed into /lusr/lib,
not /usr/local/lib.  What are the shared objects you are expecting
in /usr/local/lib???

[EMAIL PROTECTED]:~> icu-config --invoke
env 'LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}'

[EMAIL PROTECTED]:~> ls -l /usr/lib | grep icu
lrwxrwxrwx   1 root root   18 2008-07-20 19:05 libicudata.so ->
libicudata.so.36.0
lrwxrwxrwx   1 root root   18 2008-04-19 09:44 libicudata.so.36 ->
libicudata.so.36.0
-rwxr-xr-x   1 root root 10154796 2008-02-14 06:15 libicudata.so.36.0
lrwxrwxrwx   1 root root   18 2008-07-20 19:05 libicui18n.so ->
libicui18n.so.36.0
lrwxrwxrwx   1 root root   18 2008-04-19 09:44 libicui18n.so.36 ->
libicui18n.so.36.0
-rwxr-xr-x   1 root root  1329472 2008-02-14 06:15 libicui18n.so.36.0
lrwxrwxrwx   1 root root   16 2008-07-20 19:05 libicuio.so ->
libicuio.so.36.0
lrwxrwxrwx   1 root root   16 2008-04-19 09:44 libicuio.so.36 ->
libicuio.so.36.0
-rwxr-xr-x   1 root root43308 2008-02-14 06:15 libicuio.so.36.0
lrwxrwxrwx   1 root root   16 2008-07-20 19:05 libicule.so ->
libicule.so.36.0
lrwxrwxrwx   1 root root   16 2008-04-19 09:44 libicule.so.36 ->
libicule.so.36.0
-rwxr-xr-x   1 root root   267128 2008-02-14 06:15 libicule.so.36.0
lrwxrwxrwx   1 root root   16 2008-07-20 19:05 libiculx.so ->
libiculx.so.36.0
lrwxrwxrwx   1 root root   16 2008-04-19 09:44 libiculx.so.36 ->
libiculx.so.36.0
-rwxr-xr-x   1 root root38840 2008-02-14 06:15 libiculx.so.36.0
lrwxrwxrwx   1 root root   16 2008-07-20 19:05 libicutu.so ->
libicutu.so.36.0
lrwxrwxrwx   1 root root   16 2008-04-19 09:44 libicutu.so.36 ->
libicutu.so.36.0
-rwxr-xr-x   1 root root   109248 2008-02-14 06:15 libicutu.so.36.0
lrwxrwxrwx   1 root root   16 2008-07-20 19:05 libicuuc.so ->
libicuuc.so.36.0
lrwxrwxrwx   1 root root   16 2008-04-19 09:44 libicuuc.so.36 ->
libicuuc.so.36.0
-rwxr-xr-x   1 root root  1176976 2008-02-14 06:15 libicuuc.so.36.0

I guess I need to unravel this to the point where I can use "ldd" to
list the dependencies.You would think that such a tool would be part
of the package.

   -- Dan Connelly


Dan Reverri wrote:
> Are you running couchdb as a different user? If so, have you set the
> LD_LIBRARY_PATH for this user correctly?
>
> On Mon, Jul 21, 2008 at 6:43 PM, Dan Connelly <[EMAIL PROTECTED]>
> wrote:
>
>   
>> 
>>
>> Isn't this sufficient on LD_LIBRARY?   How can I force a verbose
>> dependency check?
>>
>>-- Dan Connelly (not yet relaxed)
>>
>> 
>
>   



Re: Need to troubleshoot: open_error,-10

2008-07-22 Thread Dan Connelly
Hi Noah:

Ah, yes, /strace/. Deja vu, but with a js twist.   You suggested
strace to me back when I was struggling with CouchDB 0.7.   It solved my
problem then, a completely different problem then.   Regrettably, strace
slipped from short-term memory between 0.7 and 0.8.   My bad.   In any
case, you have solved my new problem with the same old suggestion.  
CouchDB 0.8 works for me now.

Analysis/Fix:

It seems that the "couchdb" script effectively ignores the
LD_LIBRARY_PATH setting. (So, I am still not sure what the "correct"
setting would be.)

I moved my just-built libjs.so into /usr/lib from /usr/local/js/lib
(which dir had been designated on my LD_LIBRARY_PATH) and everything is
good./usr/lib is searched by default, it seems.

Which part of my Analysis/Fix would you like me to transcribe to the wiki?

-- Dan Connelly


Noah Slater wrote:
> On Tue, Jul 22, 2008 at 07:57:33AM -0400, Dan Connelly wrote:
>   
>> Dan Reverri wrote:
>> 
>>> Are you running couchdb as a different user? If so, have you set the
>>> LD_LIBRARY_PATH for this user correctly?
>>>   
>> What does "correctly" mean?
>> 
>
> Set up to point to your installed libraries.
>
>   
>> The ErrorMessages page (wiki) tells me to run couchdb this way:
>>
>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/js/lib couchd
>>
>> THIS NEEDS MORE EXPLANATION IN THE WIKI.
>> 
>
> CouchDB is a volunteer project. Your contributions are welcome.
>
>   
>> In my case, "/usr/local/lib" is useless. What is its intended purpose?
>> 
>
> To serve as an example.
>
> You need to replace the example with the correct library path.
>
>   
>> It should not be necessary to pre-set the LD_LIBRARY_PATH for the ICU shared
>> objects. The couchdb script uses "icu-config" to put those shared objects on
>> the LD_LIBRARY_PATH dynamically, within the invocation. Such a dynamic set-up
>> should be just fine for ICU.
>> 
>
> The LD_LIBRARY_PATH is also needed for the SpiderMonkey libraries.
>
> The `icu-config` command has nothing to do with SpiderMonkey.
>
> If you want to improve the `couchdb` command, I look forward to your patch.
>
>   
>> In my case, OpenSuSE comes with ICU already installed into /lusr/lib, not
>> /usr/local/lib. What are the shared objects you are expecting in
>> /usr/local/lib???
>> 
>
> Please check that your SpiderMonkey libraries are being picked up.
>
>   
>> I guess I need to unravel this to the point where I can use "ldd" to list the
>> dependencies.
>> 
>
> You could try using the `strace` tool to see where it's looking for libs.
>
>   
>> You would think that such a tool would be part of the package.
>> 
>
> Patches welcome.
>
> Thanks,
>
>   



Re: Need to troubleshoot: open_error,-10

2008-07-22 Thread Dan Connelly
Noah Slater wrote:
> On Tue, Jul 22, 2008 at 10:45:57AM -0400, Dan Connelly wrote:
>   
>> It seems that the "couchdb" script effectively ignores the LD_LIBRARY_PATH
>> setting. (So, I am still not sure what the "correct" setting would be.)
>> 
>
> Someone suggested to me that the `su` invocation in the `/etc/init.d/couchdb`
> script should properly initialise the `couchdb` user's environment.
>
> Are you running CouchDB from the init script as the superuser?
>   
Not as superuser.   I enter "couchdb" at my personal bash prompt.   I am
in the "dev" group.   I did need to give dev g+w permission in 2 couchdb
directories to get this going.Those were the only necessary changes
to run as a normal user in the dev group, which is what I want.
> If so, this might be the problem.
>
> Who originally suggested this may be a problem? Please speak up.
>
> If you are not invoking CouchDB in this method, I am quite confused. The
> LD_LIBRARY_PATH environment variable should not be ignored.
>
>   
/strace/ shows system calls, right?  I would not expect to see shell env
variables in the system calls.   But I see the literal
"${LD_LIBRARY_PATH}" in the fopen path strings for libjs.so, without
substitution.I believe this is wrong.
>> I moved my just-built libjs.so into /usr/lib from /usr/local/js/lib (which 
>> dir
>> had been designated on my LD_LIBRARY_PATH) and everything is good. /usr/lib 
>> is
>> searched by default, it seems.
>> 
>
> If you move it back and export LD_LIBRARY_PATH=/usr/local/js/lib does it work?
>   
Nope.  This fails for me.Does it work for you?   Can you verify
(using strace) the actual file "open" path that reads libjs.so?

Here is what I see:
...
close(7)= 0
open("/usr/lib/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("${LD_LIBRARY_PATH}/tls/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("${LD_LIBRARY_PATH}/tls/i686/libjs.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("${LD_LIBRARY_PATH}/tls/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("${LD_LIBRARY_PATH}/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("${LD_LIBRARY_PATH}/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("${LD_LIBRARY_PATH}/i686/libjs.so", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("${LD_LIBRARY_PATH}/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("${LD_LIBRARY_PATH}/libjs.so", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/etc/ld.so.cache", O_RDONLY)  = 7
fstat64(7, {st_mode=S_IFREG|0644, st_size=107110, ...}) = 0
mmap2(NULL, 107110, PROT_READ, MAP_PRIVATE, 7, 0) = 0xb6b66000
close(7)= 0
open("/lib/tls/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/tls/i686/sse2", 0xbfaa3878) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i686/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls/i686", 0xbfaa3878) = -1 ENOENT (No such file or
directory)
open("/lib/tls/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls/sse2", 0xbfaa3878) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/tls", 0xbfaa3878)  = -1 ENOENT (No such file or
directory)
open("/lib/i686/sse2/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib/i686/sse2", 0xbfaa3878)= -1 ENOENT (No such file or
directory)
open("/lib/i686/libjs.so", O_RDONLY)= -1 ENOENT (No such file or
directory)
stat64("/lib/i686", 0xbfaa3878) = -1 ENOENT (No such file or
directory)
open("/lib/sse2/libjs.so", O_RDONLY)= -1 ENOENT (No such file or
directory)
stat64("/lib/sse2", 0xbfaa3878) = -1 ENOENT (No such file or
directory)
open("/lib/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libjs.so", O_RDONLY) = -1 ENOENT (No such file or
directory)
munmap(0xb6b66000, 107110)  = 0
munmap(0xb7f14000, 8380)= 0
munmap(0xb7675000, 1177788) = 0
munmap(0xb6cc5000, 10158080)= 0
munmap(0xb6b81000, 1326168) = 0
fstat64(1, {s

Re: the search api?

2008-07-27 Thread Dan Reverri
Dean,

Any chance you want to share your view code?

In regards to the query parsing, I am not sure how this will work. Right now
results for each term have to be pulled down to the client and merged
together. Perhaps we could add a query method to views that allow different
key values to be combined.

A user could query a view with a set of keys and a merge function that could
define how the key values could be combined.

On Fri, Jul 25, 2008 at 5:01 PM, Dean Landolt <[EMAIL PROTECTED]> wrote:

> On Mon, Jul 21, 2008 at 11:45 AM, Dean Landolt <[EMAIL PROTECTED]>
> wrote:
>
> > On Mon, Jul 21, 2008 at 1:08 AM, Dan Reverri <[EMAIL PROTECTED]> wrote:
> >
> >> Is it worthwhile to implement a full text indexer on top of couchdbs
> >> map/reduce functionality?
> >>
> >> http://wiki.apache.org/couchdb/FullTextIndexWithView
> >>
> >
> >
> > Interesting idea. There's definitely more to FTI than tokenization alone,
> > but then again there's an awful lot of power in m/r and javascript -- it
> > didn't take me a second to find a porter stemming algorithm in js:
> > http://tartarus.org/~martin/PorterStemmer/js.txt<http://tartarus.org/%7Emartin/PorterStemmer/js.txt>
> <http://tartarus.org/%7Emartin/PorterStemmer/js.txt>
> >
> > I bet variable weighting would be pretty close to impossible in the m/r
> > paradigm though, and probably some other features (of course, I could be
> > wrong, and when it comes to couchdb, thus far I usually am). For a
> strait-up
> > word search, this is servicible as is. I'm going to see if I can't figure
> > out how to shoehorn in some boolean features.
> >
>
> I gave this approach another look and I was able to get a view together
> that
> did a little more (stemming, optional case-insensitivity, min length for
> tokens, better whitespace handling). I'm working on an ngram view too and
> so
> far it's promising. But there's still one huge problem -- for the life of
> me
> I can't figure out a workable strategy for boolean operations that doesn't
> involve fully loading each piece of the query. Am I missing something? Is
> something like this even possible? I know there's no way to load a piece of
> a view from another view -- but I just can't help but really wish there
> were.
>