You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Ronan Jouchet <ro...@cadensimaging.com> on 2017/01/26 17:06:51 UTC

How to prep my CouchDB 2 for *text* indexes/queries?

Hi!

Following mailing list discussion [1], I am looking at the
performance of various Mango ways to fetch a bunch of docs.

Following Garren links, I stumbled upon a blog post called
"Understanding Mango View-Based Indexes vs. Search-Based Indexes" [2].
There, the author mentions that:

> If users don't know in advance what queries will be executed,
> then Mango search-based indexes are the way to go.
> This flexibility, however, comes with its own tradeoffs.

That sounds interesting for my use case, so I'm off to Fauxton
creating test docs and trying to declare my first `text` index:

> {
>   "index": {
>     "fields": [{"name": "test_textindexed", "type": "number"}]
>   },
>   "type": "text"
> }

To which Fauxton responds with error "text", and a 503 shows up
in the CouchDB log. Looks like I simply don't have the Lucene
engine plugged, but I'm at a loss as to how to enable it in a
post-CouchDB2-release world:

- I couldn't find any mention of it in the docs [3].

- I'm unsure what part of this Cloudant work is now merged
   into CouchDB 2 vs. what still needs manual installation,
   and my Googling yields mostly old posts/documentation.
   * Should I follow the readme of couchdb-lucene? [4]
   * Is this 2015 post "Enable FTS in CouchDB" [5] still relevant?

- I'm currently running couchdb2 via the official Docker image.
   Should I give klaemo/couchdb-lucene [6] a try?

Thanks for your help :)

[1] 
https://lists.apache.org/thread.html/1cd9fa2d063ca0f476d703e4f36fe62d366f9a2fd8910954dcd4798e@%3Cuser.couchdb.apache.org%3E

[2] https://cloudant.com/blog/mango-json-vs-text-indexes/

[3] http://docs.couchdb.org/en/2.0.0/

[4] https://github.com/rnewson/couchdb-lucene

[5] https://developer.ibm.com/dwblog/2015/text-search-apache-couchdb/

[6] https://github.com/klaemo/docker-couchdb-lucene

Re: How to prep my CouchDB 2 for *text* indexes/queries?

Posted by Ronan Jouchet <ro...@cadensimaging.com>.
On 2017-01-26 22:51, Joan Touzet wrote:
> I'm afraid you're going to have to custom compile CouchDB to
> use Lucene with it. More information on how to do this within
> the Docker environment is available at
> 
> https://github.com/klaemo/docker-couchdb/issues/48#issuecomment-274323668
> 
> which discusses an effort to add clouseau to the CouchDB 2.0
> Docker image and pair it with a secondary image that actually
> runs dreyfus and Lucene.

Fantastic, thanks for the pointer <insert xkcd joke here> and
confirmation that a custom compile is still the way to go.

> FYI there may be an "official Docker image" that has our blessing,
> but it's not a direct work product of Apache CouchDB -- Clemens,
> a long standing member of this community and a CouchDB committer,
> maintains this project on behalf of the community.

Yup, that was clear to me \U0001f44d. Thanks!

Re: How to prep my CouchDB 2 for *text* indexes/queries?

Posted by Joan Touzet <wo...@apache.org>.
Hi Ronan,

I'm afraid you're going to have to custom compile CouchDB to use
Lucene with it. More information on how to do this within the Docker
environment is available at

https://github.com/klaemo/docker-couchdb/issues/48#issuecomment-274323668

which discusses an effort to add clouseau to the CouchDB 2.0 Docker 
image and pair it with a secondary image that actually runs dreyfus and
Lucene.

FYI there may be an "official Docker image" that has our blessing,
but it's not a direct work product of Apache CouchDB -- Clemens,
a long standing member of this community and a CouchDB committer,
maintains this project on behalf of the community.

-Joan

----- Original Message -----
> From: "Ronan Jouchet" <ro...@cadensimaging.com>
> To: "Joan Touzet" <wo...@apache.org>, "couchdb-user" <us...@couchdb.apache.org>
> Sent: Thursday, January 26, 2017 2:02:20 PM
> Subject: Re: How to prep my CouchDB 2 for *text* indexes/queries?
> 
> On 2017-01-26 13:41, Joan Touzet wrote:
> > See https://cloudant.com/blog/open-sourcing-cloudant-search/
> > for all the details.
> Hi Joan.
> 
> Thanks, that's helpful as a historical perspective. But that's not
> what
> I'm looking for. My email provided some context, but it looks like it
> must have muddied the core question. Let me re-iterate in a drier
> way.
> 
> I'm currently using couchdb2 via the official Docker image. What's
> the
> easiest way to plug Lucene? Is there end-to-end documentation?
> 

Re: How to prep my CouchDB 2 for *text* indexes/queries?

Posted by Ronan Jouchet <ro...@cadensimaging.com>.
On 2017-01-26 13:41, Joan Touzet wrote:
> See https://cloudant.com/blog/open-sourcing-cloudant-search/
> for all the details.
Hi Joan.

Thanks, that's helpful as a historical perspective. But that's not what
I'm looking for. My email provided some context, but it looks like it
must have muddied the core question. Let me re-iterate in a drier way.

I'm currently using couchdb2 via the official Docker image. What's the
easiest way to plug Lucene? Is there end-to-end documentation?

Re: How to prep my CouchDB 2 for *text* indexes/queries?

Posted by Joan Touzet <wo...@apache.org>.
Hi Roman,

See https://cloudant.com/blog/open-sourcing-cloudant-search/ for
all the details.

-Joan

----- Original Message -----
> From: "Ronan Jouchet" <ro...@cadensimaging.com>
> To: "couchdb-user" <us...@couchdb.apache.org>
> Sent: Thursday, January 26, 2017 12:06:51 PM
> Subject: How to prep my CouchDB 2 for *text* indexes/queries?
> 
> Hi!
> 
> Following mailing list discussion [1], I am looking at the
> performance of various Mango ways to fetch a bunch of docs.
> 
> Following Garren links, I stumbled upon a blog post called
> "Understanding Mango View-Based Indexes vs. Search-Based Indexes"
> [2].
> There, the author mentions that:
> 
> > If users don't know in advance what queries will be executed,
> > then Mango search-based indexes are the way to go.
> > This flexibility, however, comes with its own tradeoffs.
> 
> That sounds interesting for my use case, so I'm off to Fauxton
> creating test docs and trying to declare my first `text` index:
> 
> > {
> >   "index": {
> >     "fields": [{"name": "test_textindexed", "type": "number"}]
> >   },
> >   "type": "text"
> > }
> 
> To which Fauxton responds with error "text", and a 503 shows up
> in the CouchDB log. Looks like I simply don't have the Lucene
> engine plugged, but I'm at a loss as to how to enable it in a
> post-CouchDB2-release world:
> 
> - I couldn't find any mention of it in the docs [3].
> 
> - I'm unsure what part of this Cloudant work is now merged
>    into CouchDB 2 vs. what still needs manual installation,
>    and my Googling yields mostly old posts/documentation.
>    * Should I follow the readme of couchdb-lucene? [4]
>    * Is this 2015 post "Enable FTS in CouchDB" [5] still relevant?
> 
> - I'm currently running couchdb2 via the official Docker image.
>    Should I give klaemo/couchdb-lucene [6] a try?
> 
> Thanks for your help :)
> 
> [1]
> https://lists.apache.org/thread.html/1cd9fa2d063ca0f476d703e4f36fe62d366f9a2fd8910954dcd4798e@%3Cuser.couchdb.apache.org%3E
> 
> [2] https://cloudant.com/blog/mango-json-vs-text-indexes/
> 
> [3] http://docs.couchdb.org/en/2.0.0/
> 
> [4] https://github.com/rnewson/couchdb-lucene
> 
> [5] https://developer.ibm.com/dwblog/2015/text-search-apache-couchdb/
> 
> [6] https://github.com/klaemo/docker-couchdb-lucene
>