Hello,
Could you please help me to figure out what is correct definition for my FTS indexes?
In my couchbase DB I have 2 types of documents let’s say:
{“id”: “cr_Tbqja”, “type”: “car”, “description” : “Volvo”}
and
{“id”: “bk_abqja”, “type”: “bike”, “description” : “Mountain bike”}
I have defined 2 FTS indexes (I am not sure if I suppose to have 2).
For both of them I selected:
also first index is “car_fts_index”, having under “Type Mappings” - “car” (selected), also checkbox " only index specified fields" selected.
and second index is “bike_fts_index” with similar definition, having under “Type Mappings” - “bike” (selected), also checkbox “only index specified fields” selected.
What appears strange to me is for both of the indexes I see same number of doc count.
Does this mean it is not indexing separately cars and bikes (by type actually)?
Also is it correct to keep 2 separate FTS indexes, each of them having different type mapping or should I create 1 bigger index having 2 types inside it?
Thanks is advance.
Please any idea, I am totally confused with doc count. When specifying a concrete mapping it suppose to index only the documents, that have type=car (or in different case bike), but why for both indexes the doc count is the same???
In real life we are planning to have ~15 FTS indexes, each of them containing 1 type mapping and our biggest concern is performance. Our couchbase server is using 75-80% of memory even when has very little number of operations. So we are worried may be because of our FTS indexes. Should we have just 1 FTS index with all 15 types mappings? It will be difficult to manipulate it.
Waiting for any hints.
Thanks.
From the documentation… “The document count shows how many documents have been indexed so far.”
This is actually pretty normal. When you set a bucket quota, Couchbase will try to keep as many of the documents as possible in memory within this quota. This also is covered in the introductory documentation. You can probably run ps -u couchbase
(assuming Linux/MacOS) and see which processes are using memory. It’s not likely FTS, but you can control that quota through the UI.
Less indexes is better, but as to whether you need more memory if you have 15 indexes or not, that’d depend a bit on the working set you’re dealing with. I’d probably recommend testing regularly with a representative dataset and whatever searches you need to be fast. It may be just fine with the amount of resources you’re using.
Also, if this is for a new app, you might try 6.5 Beta, as it has additional performance improvements for FTS.