Other Data Tools

      +

      Document Viewer

      Another simple and fast way to find and look at documents is by selecting Tools, then Documents.

      19

      Here are a few things you can do with the document viewer:

      • Change your buckets, scopes, and collections to see documents segmented in those ways. Set bucket to Travel Sample, scope to Inventory and collection to Hotel

      • Click on a document name in the ID column to open and edit that document. From within the flyout, at the top, it shows you the document hierarchy.

      • Change the default doc limit from 5, to see more documents

      • Change the offset to skip the first X documents. Change it to 25 and see your list change.

      • Search documents by document ID. In the Id box, paste “hotel_21725” and press retrieve. This will pull up a hotel in Paris near the Louvre Metro.

      • In the N1QL Where box, paste the following: city='Half Moon Bay' — this will bring up the hotel located in this California town.

      Sample Indexes

      Now let’s look at the cluster indexes. Choose the Tools tab then Indexes.

      In Couchbase, primary and global secondary indexes -- also known as just indexes  — are predefined subsets of bucket-data created by the Index Service.

      The sample buckets automatically created indexes upon import. For more information about viewing and interacting with indexes, refer to Index Service.

      20

      If you select an index, it will open a flyout with more details about that index. Here you can see the number of items covered by that index and how it is performing.

      21

      Couchbase Capella Full Text Search (FTS) lets you create, manage, and query specially purposed indexes, defined on JSON documents within a Couchbase bucket.

      The Full Text Search editor is available under each cluster’s Tools  Full Text Search tab. To do a search, we must first create an index.

      1. Click Add Index. The Add Index flyout appears.

      2. Type the name "hotel-description" and choose the "travel-sample" bucket and press continue.

      3. In the index settings, press Add a Mapping.

      4. For the name, type: "hotel", and click Create Mapping.

      5. For your newly created type mapping, click the ellipsis … (3 dots) for a submenu, and click Insert Child Field.

      6. For the Field, type: "description", and tick all the boxes at the bottom. Now press Create Child Field.

      7. For the last step of the add index process, scroll to the bottom and click Create Index. Your new Index should now appear.

      8. Click on the name of your new index and press the Search button. A Search fly-out appears.

      9. Now on the search bar enter “description:free wifi” then click the Search button.

      10. All hotel documents with matching terms are listed. Also, the execution time is also displayed.

      11. Experiment with other search terms. Click the "x" in the upper right to close the Search flyout screen.

      12. Learn more about Couchbase Capella Full Text Search here.

      Congratulations! You have completed all the steps in this "First timer" tutorial.

      Want to learn more about Capella?