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

198 views
Skip to first unread message

Ronan Jouchet

unread,
Jan 26, 2017, 12:07:01 PM1/26/17
to couchdb-user
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

Joan Touzet

unread,
Jan 26, 2017, 1:46:22 PM1/26/17
to us...@couchdb.apache.org
Hi Roman,

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

-Joan

Ronan Jouchet

unread,
Jan 26, 2017, 2:02:25 PM1/26/17
to Joan Touzet, couchdb-user
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?

Joan Touzet

unread,
Jan 26, 2017, 10:55:46 PM1/26/17
to us...@couchdb.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" <ronan....@cadensimaging.com>

Ronan Jouchet

unread,
Jan 27, 2017, 9:19:43 AM1/27/17
to us...@couchdb.apache.org, Joan Touzet
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 👍. Thanks!
Reply all
Reply to author
Forward
0 new messages