couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Washington <timothyjwashing...@yahoo.ca>
Subject Re: Cannot search single terms in Couchdb-lucene (maybe Analyzer problems)
Date Thu, 12 Aug 2010 14:02:03 GMT
Hey Robert, 

It's not so much a matter of time as, I don't really know how I cam about the 
error / bug. I just remember the point where A) did not work, but B) did: 

A) 'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all?q=title:GLAM'
B) 'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all?q=title:WHAT DO YOU 
WEAR TO GLAM UP YOUR LOOK FOR A SPECIAL EVENT?'


One thing I did to get field searching working correctly was to explicitly tell 
the index that the title is named 'title': 

var ret=new Document(); 
ret.add(doc.title, {'field':'title' , 'store':'yes' });
...


But this confused me as to why B) was working in the first place. I was also 
trying out 0.5 vs. 0.6, but I'mpretty sure that was after I did the abouve. I'm 
not sure if this is helpful. I'll try retracing how I got to that point. 



More soon 
Tim





________________________________
From: Robert Newson <robert.newson@gmail.com>
To: user@couchdb.apache.org
Sent: Thu, August 12, 2010 5:41:52 AM
Subject: Re: Cannot search single terms in Couchdb-lucene (maybe Analyzer  
problems)

Tim,

I tried for a while this morning to reproduce this problem. Namely,
that c-l gets confused sometimes and queries into the wrong index
(from our conversation on IRC this seemed the most plausible reason
why your search found no results). Unfortunately, I have failed. I
changed my index function numerous times (both changes to the "index"
function and the "analyzer" setting), and I got back the results I
expected every time (ok, not *so* unfortunately).

I think you have found a bug in c-l but I can't trigger it, which
makes fixing it very tricky. If you can, a step-by-step description of
how you got here would help me enormously. I understand if you don't
have the time.

Thanks,
B.

On Tue, Aug 10, 2010 at 10:20 PM, Robert Newson <robert.newson@gmail.com> wrote:
> just missed you on IRC :( my nick is rnewson.
>
> B.
>
> On Tue, Aug 10, 2010 at 10:16 PM, Timothy Washington
> <timothyjwashington@yahoo.ca> wrote:
>> I'm at the latest commit on github's master, and the
>> 'couchdb-lucene-0.5.4-dist.tar.gz' release gives the same results. So the
>> problem doesn't seem to be the version(s) of couchdb_lucene.
>>
>>
>> I'm also on #couchdb on freenode. My nick is 'tim' and I put out the message
>> 'success... sorry for the noise'. I'll dig a bit deeper into this tomorrow
>> morning.
>>
>>
>> Thanks for all the feedback
>> Tim
>>
>>
>>
>>
>>
>>
>> ________________________________
>> From: Timothy Washington <timothyjwashington@yahoo.ca>
>> To: user@couchdb.apache.org
>> Sent: Tue, August 10, 2010 4:40:52 PM
>> Subject: Re: Cannot search single terms in Couchdb-lucene (maybe Analyzer
>> problems)
>>
>> Sure thing. I'll try out i) the new update and ii) #couchdb on freenode too.
>> Just need to get an IRC client for my Ubuntu.
>>
>>
>>
>> A)
>> baron@baron-dev:~/Baron$ wget http://172.16.114.129:5985/
>> ...
>> 2010-08-10 16:37:05 (1.52 MB/s) - `index.html' saved [55/55]
>>
>> baron@baron-dev:~/Baron$ cat index.html
>> {"couchdb-lucene":"Welcome","version":"0.6-SNAPSHOT"}
>>
>>
>> B)
>> baron@baron-dev:~/Baron$ wget
>> 'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all'
>> ...
>> 2010-08-10 16:35:14 (5.79 MB/s) - `by_all' saved [154/154]
>>
>> baron@baron-dev:~/Baron$ cat by_all
>>{"current":true,"disk_size":668722,"doc_count":685,"doc_del_count":0,"fields":["default"],"last_modified":"1281467838000","optimized":false,"ref_count":2}
>>}
>>
>>
>>
>>
>>
>> Tim
>>
>>
>>
>>
>>
>> ________________________________
>> From: Robert Newson <robert.newson@gmail.com>
>> To: user@couchdb.apache.org
>> Sent: Tue, August 10, 2010 4:30:00 PM
>> Subject: Re: Cannot search single terms in Couchdb-lucene (maybe Analyzer
>> problems)
>>
>> Oh, and also output of wget http://172.16.114.129:5985/
>>
>> Thanks,
>> B.
>>
>> On Tue, Aug 10, 2010 at 9:13 PM, Robert Newson <robert.newson@gmail.com> 
>wrote:
>>> Can you also report the result of wget
>>> 'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all' please?
>>>
>>> I pushed 0.5.5 today. It (and 0.6-SNAPSHOT) have a fix related to your
>>> problem, assuming it's this. The requested info above will help me.
>>>
>>> Also, if you can jump on #couchdb on freenode, we can do this a bit
>>> more interactively.
>>>
>>> B.
>>>
>>>
>>> On Tue, Aug 10, 2010 at 9:06 PM, Timothy Washington
>>> <timothyjwashington@yahoo.ca> wrote:
>>>> Oh that's interesting. I was just working off of the latest github master.
>>>I'll
>>>> try one of the downloads. In the meantime, here's the results with the 
>debug:
>>>>
>>>> baron@baron-dev:wget
>>>>'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all?debug=true&q=title:GLAM'
>>>>
>>>>
>>>>'
>>>>
>>>> ...
>>>> baron@baron-dev:~/Baron$ cat 'by_all?debug=true&q=title:GLAM'
>>>> {
>>>>  "q": "title:glam",
>>>>  "plan": "TermQuery(title:glam,boost=1.0)",
>>>>  "analyzer": "org.apache.lucene.analysis.standard.StandardAnalyzer",
>>>>  "etag": "2f07e40455e",
>>>>  "skip": 0,
>>>>  "limit": 25,
>>>>  "total_rows": 0,
>>>>  "search_duration": 0,
>>>>  "fetch_duration": 0,
>>>>  "rows": []
>>>> }
>>>>
>>>>
>>>>
>>>> Tim
>>>>
>>>>
>>>>
>>>>
>>>> ________________________________
>>>> From: Robert Newson <robert.newson@gmail.com>
>>>> To: user@couchdb.apache.org
>>>> Sent: Tue, August 10, 2010 3:47:46 PM
>>>> Subject: Re: Cannot search single terms in Couchdb-lucene (maybe Analyzer
>>>> problems)
>>>>
>>>> can you add debug=true to the query arguments and paste the result?
>>>>
>>>> Note that 0.6 is not released yet, I'd encourage you to work from a
>>>> release or the 0.5.x branch.
>>>>
>>>> B.
>>>>
>>>> On Tue, Aug 10, 2010 at 8:19 PM, Timothy Washington
>>>> <timothyjwashington@yahoo.ca> wrote:
>>>>>
>>>>> I don't have a specific analyzer declared, so it'll be the default one.
>>>>>
>>>>> Here's the design document:
>>>>> {
>>>>>   "_id": "_design/foo",
>>>>>   "_rev": "4-9d0eb8eba0080e61952317efd9f55ebc",
>>>>>   "fulltext": {
>>>>>       "by_title": {
>>>>>           "index": "function(doc) { var ret=new Document();
>>>> ret.add(doc.title);
>>>>> return ret }"
>>>>>       },
>>>>>       "by_source": {
>>>>>           "index": "function(doc) { var ret=new Document();
>>>>> ret.add(doc.source); return ret }"
>>>>>       },
>>>>>       "by_all": {
>>>>>           "index": "function(doc) {
>>>>>        var ret=new Document();
>>>>>        ret.add(doc.title);
>>>>>        ret.add(doc.body);
>>>>>        ret.add(doc.source);
>>>>>        return ret;
>>>>>       }"
>>>>>       }
>>>>>   }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> Tim
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ________________________________
>>>>> From: Sebastian Cohnen <sebastiancohnen@googlemail.com>
>>>>> To: user@couchdb.apache.org
>>>>> Sent: Tue, August 10, 2010 3:05:04 PM
>>>>> Subject: Re: Cannot search single terms in Couchdb-lucene (maybe Analyzer
>>>>> problems)
>>>>>
>>>>> what analyzer are you using? can you provide the ddoc? have you tried
to
>>>> search
>>>>> for the single term in lowercase?
>>>>>
>>>>> Best
>>>>>
>>>>> Sebastian
>>>>>
>>>>> On 10.08.2010, at 21:01, Timothy Washington wrote:
>>>>>
>>>>>> Our team is using couchdb-lucene. We have the tool installed, configured
>> and
>>>>>> indexing properly. And our full field searching works properly.
>>>>>>
>>>>>>
>>>>>> But if we want to search for one one word in a field ('title', or
>> 'summary',
>>>>>>for
>>>>>>
>>>>>> example), we get no results. So, on a document with the title "WHAT
DO 
YOU
>>>>>WEAR
>>>>>>
>>>>>> TO GLAM UP YOUR LOOK FOR A SPECIAL EVENT?", document A) works, but
B) 
does
>>>>>not.
>>>>>>
>>>>>>
>>>>>>
>>>>>> A) wget
>>>> 'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all?q=title:WHAT
>>>>>
>>>>>> DO YOU WEAR TO GLAM UP YOUR LOOK FOR A SPECIAL EVENT?'
>>>>>> B) wget
>>>>> 'http://172.16.114.129:5984/baron/_fti/_design/foo/by_all?q=title:GLAM'
>>>>>>
>>>>>>
>>>>>> We're playing around with the settings - a different index analyzer

maybe?
>>>> But
>>>>>
>>>>>> I'm sure we're just missing a basic switch/lever somewhere. Anyone
have 
>any
>>>>>> knowledge here?
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> Tim
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message