Full Text Search (FTS) using the C (libcouchbase) SDK with Couchbase Server

You can use the Full Text Search service (FTS) to create queryable full-text indexes in Couchbase Server. This page describes how to use Full Text Search using the C SDK.

Couchbase offers Full-Text search support, allowing you to search for documents that contain certain words or phrases. In the C SDK, you can search full-text indexes by using the row-based lcb_fts_query() API (#include <libcouchbase/cbft.h> first, though!)

To use the lcb_fts_query function, first create an lcb_CMDFTS structure, and populate it with a query. The query should be specified as a JSON-encoded string and can be generated using any JSON encoder:

    std::string encodedQuery(
        "{\"query\":{\"match\":\"hoppy\"},\"indexName\":\"beer-search\",\"size\":10}");
    lcb_CMDFTS cmd = { 0 };
    cmd.callback = rowCallback;
    cmd.query = encodedQuery.c_str();
    cmd.nquery = encodedQuery.size();
See a fully compilable example using FTS from the C SDK: https://github.com/couchbaselabs/devguide-examples/blob/server-4.5/c/fts-basic.cc
static void rowCallback(lcb_t, int, const lcb_RESPFTS *resp)
{
    if (resp->rflags & LCB_RESP_F_FINAL) {
        printf("Status: %d\n", resp->rc);
        printf("Meta: %.*s\n", (int)resp->nrow, resp->row);
        if (resp->htresp) {
            printf("HTTP Response: %.*s\n", (int)resp->htresp->nbody, resp->htresp->body);
        }
    } else {
        printf("Row: %.*s\n", (int)resp->nrow, resp->row);
    }
}

Note that the indexName must be present in the query.

The callback (i.e. lcb_CMDFTS::callback) is invoked once for each query hit, and one more time (with the LCB_RESP_F_FINAL flag set in the lcb_RESPFTS::rflags field) with the query response metadata. The metadata contains things such as response facets

Refer to Understanding Queries for more information about the encoded query format. A general introduction to FTS, with pointers to detailed descriptions of its principal features, is provided in Full Text Search: Fundamentals.

Detailed Examples

The code example below demonstrates the Full Text Search API. The example assumes that Couchbase Server is running, and that the username Administrator and the password password provide authorization for performing the searches. It also assumes that the travel-sample bucket has been installed. For information on creating users and managing roles, see Authorization. For information on installing sample buckets, see Manage Settings. Don’t forget to create an lcb_CMDFTS structure, and populate it with a query, as in the first example, above.

The example also assumes the existence of three specific Full Text Indexes, defined on the travel-sample bucket. These are:

  • travel-sample-index-unstored: Uses only the default settings.

  • travel-sample-index-stored: Uses default settings, with one exception: dynamic fields are stored, for the whole index.

  • travel-sample-index-hotel-description: Indexes only the description fields of hotel documents, and disables the default type mapping. The index has a custom analyzer named myUnicodeAnalyzer defined on it: the analyzer’s main characteristic is that it uses the unicode tokenizer.

See Creating Indexes for details on how to create these indexes: they can be created interactively, by means of the Couchbase Web Console; however, there may be greater efficiency in using the Couchbase REST API, as described in the section Index Creation with the REST API. The JSON objects that constitute index-definitions (for inclusion as bodies to the index-creation REST calls), are provided in Demonstration Indexes.

The example example/fts/fts.c features the following Full Text Searches on the travel-sample bucket, within Couchbase Server:

  • Simple Text Query on a single word, targeting an index with dynamic fields unstored.

    ----> {"indexName":"travel-sample-index-unstored","size":10,"highlight":{"style":"html"},"query":{"match":"swanky"}}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"landmark_25956","score":0.8037132228729517,"locations":{"content":{"swanky":[{"pos":26,"start":146,"end":152,"array_positions":null}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_54820232","id":"landmark_25888","score":0.7269537231028589,"locations":{"content":{"swanky":[{"pos":8,"start":52,"end":58,"array_positions":null}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_54820232","id":"landmark_3421","score":0.7066356080640858,"locations":{"content":{"swanky":[{"pos":23,"start":123,"end":129,"array_positions":null}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_54820232","id":"hotel_25598","score":0.3380266349466091,"locations":{"reviews.content":{"swanky":[{"pos":139,"start":711,"end":717,"array_positions":[0]}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_6ddbfb54","id":"hotel_25794","score":0.3060403881659807,"locations":{"reviews.content":{"swanky":[{"pos":23,"start":125,"end":131,"array_positions":[1]}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"hotel_26223","score":0.2889878306400093,"locations":{"description":{"swanky":[{"pos":1,"start":0,"end":6,"array_positions":null}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"hotel_16350","score":0.269900851046037,"locations":{"reviews.content":{"swanky":[{"pos":123,"start":714,"end":720,"array_positions":[3]}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"hotel_25800","score":0.255991517659089,"locations":{"reviews.content":{"swanky":[{"pos":15,"start":80,"end":86,"array_positions":[1]}]}},"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_54820232","id":"hotel_25301","score":0.22660209598987638,"locations":{"reviews.content":{"swanky":[{"pos":7,"start":25,"end":31,"array_positions":[3]}]}},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"match":"swanky","prefix_length":0,"fuzziness":0,"operator":"or"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":9,"max_score":0.8037132228729517,"took":209051,"facets":null}
  • Simple Text Query, specifying an index that consists only of content derived from a specific field from a specific document-type.

    ----> {"indexName":"travel-sample-index-hotel-description","size":10,"query":{"match":"swanky"}}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"match":"swanky","prefix_length":0,"fuzziness":0,"operator":"or"},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":0,"max_score":0,"took":133187,"facets":null}
  • Simple Text Query on Stored Field, specifying the field to be searched; targeting an index with dynamic fields stored, to ensure that field-content is included in the return object.

    ----> {"indexName":"travel-sample-index-stored","size":10,"highlight":{"style":"html"},"query":{"field":"destinationairport","match":"MDG"}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"route_30377","score":8.864611972602955,"locations":{"destinationairport":{"mdg":[{"pos":1,"start":0,"end":3,"array_positions":null}]}},"fragments":{"destinationairport":["\u003cmark\u003eMDG\u003c/mark\u003e"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"match":"MDG","field":"destinationairport","prefix_length":0,"fuzziness":0,"operator":"or"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":1,"max_score":8.864611972602955,"took":139750,"facets":null}
  • Match Query with Facet, showing how query-results can be displayed either by row or by hits; and demonstrating use of a facet, which provides aggregation-data.

    ----> {"indexName":"travel-sample-index-stored","highlight":{"style":"html"},"size":10,"query":{"field":"reviews.content","match":"La Rue Saint Denis!!"},"facets":{"Countries Referenced":{"size":5,"field":"country"}}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_26223","score":1.1060123561061241,"locations":{"reviews.content":{"denis":[{"pos":88,"start":443,"end":448,"array_positions":[0]}],"la":[{"pos":85,"start":430,"end":432,"array_positions":[0]}],"rue":[{"pos":86,"start":433,"end":436,"array_positions":[0]}],"saint":[{"pos":87,"start":437,"end":442,"array_positions":[0]}]}},"fragments":{"reviews.content":["…libre had thieves? After all, this is supposed to be a 4 stars hotel, not a bedsit next to \u003cmark\u003eLa\u003c/mark\u003e \u003cmark\u003eRue\u003c/mark\u003e \u003cmark\u003eSaint\u003c/mark\u003e \u003cmark\u003eDenis\u003c/mark\u003e!!! I complained to the manager, Ms. Laura Lamblin, who told me that I had to go to the pol…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_8662","score":0.18089717282438075,"locations":{"reviews.content":{"rue":[{"pos":163,"start":943,"end":946,"array_positions":[3]}],"saint":[{"pos":168,"start":971,"end":976,"array_positions":[3]}]}},"fragments":{"reviews.content":["…nd within easy walking distance of the myriad of shops and restaurants on both the \u003cmark\u003eRue\u003c/mark\u003e de Rennes and Boulevard \u003cmark\u003eSaint\u003c/mark\u003e-Germain. The hotel serves a decent continental breakfast which seems expensive at 1…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_26489","score":0.11262421677946458,"locations":{"reviews.content":{"la":[{"pos":12,"start":55,"end":57,"array_positions":[0]}]}},"fragments":{"reviews.content":["…nt place to stay whilst in \u003cmark\u003eLA\u003c/mark\u003e. We were in a large suite and it was wonderful - the best bed and linen I have experienced in a hotel in a long time! I was travelling for work with my boyfriend and we b…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_37339","score":0.07801362501832362,"locations":{"reviews.content":{"la":[{"pos":76,"start":442,"end":444,"array_positions":[0]}]}},"fragments":{"reviews.content":["…e grounds and buildings were maintained to the highest standards. We got reservations in all the a \u003cmark\u003ela\u003c/mark\u003e carte restaurants and particularly enjoyed the Japenese ( we managed to get in there 3 times!!) an…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_35854","score":0.07486989518551089,"locations":{"reviews.content":{"saint":[{"pos":273,"start":1672,"end":1677,"array_positions":[0]}]}},"fragments":{"reviews.content":["…s much of the island, which makes one appreciate even more the privacy of Tamarindo Estates. We have stayed on Belize, Bonaire, \u003cmark\u003eSaint\u003c/mark\u003e Vincent, and Puerto Rico’s big island. Culebra tops all, and Tam…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_19324","score":0.07299937184634361,"locations":{"reviews.content":{"la":[{"pos":30,"start":169,"end":171,"array_positions":[1]},{"pos":32,"start":180,"end":182,"array_positions":[1]},{"pos":25,"start":127,"end":129,"array_positions":[2]}]}},"fragments":{"reviews.content":["…I am very satisfied with the hotel. Location is excellent for sightseeing - next to \u003cmark\u003eLa\u003c/mark\u003e Rambla, \u003cmark\u003eLa\u003c/mark\u003e Boqueria Market and Liceu subway station, few steps to Catalunia (where the airport bus stops). Though…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_19323","score":0.07179334544788325,"locations":{"reviews.content":{"la":[{"pos":32,"start":173,"end":175,"array_positions":[1]},{"pos":35,"start":188,"end":190,"array_positions":[1]},{"pos":28,"start":150,"end":152,"array_positions":[4]},{"pos":34,"start":179,"end":181,"array_positions":[4]},{"pos":76,"start":411,"end":413,"array_positions":[4]},{"pos":197,"start":1112,"end":1114,"array_positions":[4]},{"pos":28,"start":141,"end":143,"array_positions":[5]},{"pos":18,"start":97,"end":99,"array_positions":[6]}]}},"fragments":{"reviews.content":["…e in Barcelona. The Hotel Curious is perfectly located down a cozy street just off of \u003cmark\u003eLa\u003c/mark\u003e Ramblas and \u003cmark\u003eLa\u003c/mark\u003e Boqueria. You are a 10-minute walk from the Liceu (Green) and 15-minutes from Plaza Catalunya (a…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_26212","score":0.0659503730344147,"locations":{"reviews.content":{"la":[{"pos":28,"start":132,"end":134,"array_positions":[0]},{"pos":23,"start":118,"end":120,"array_positions":[1]},{"pos":32,"start":180,"end":182,"array_positions":[2]},{"pos":8,"start":33,"end":35,"array_positions":[4]},{"pos":56,"start":288,"end":290,"array_positions":[4]}]}},"fragments":{"reviews.content":["…e opportunity came up to spend a night at the newly built Shangri-\u003cmark\u003eLa\u003c/mark\u003e Hotel for New Years Eve, we couldn't resist. We had heard so many wonderful things and were very excited. Our good friend Jeffrey V…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_26498","score":0.06565206104519802,"locations":{"reviews.content":{"la":[{"pos":150,"start":861,"end":863,"array_positions":[1]},{"pos":182,"start":1025,"end":1027,"array_positions":[1]}]}},"fragments":{"reviews.content":["… but because our stays in \u003cmark\u003eLA\u003c/mark\u003e were just one-dayers this time, we chose an airport hotel, but got the bus into Santa Monica and West Hollywood for the day. Looking forward to our next stay in \u003cmark\u003eLA\u003c/mark\u003e at West…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_20737","score":0.0654032654874764,"locations":{"reviews.content":{"la":[{"pos":15,"start":63,"end":65,"array_positions":[0]},{"pos":20,"start":115,"end":117,"array_positions":[2]},{"pos":4,"start":9,"end":11,"array_positions":[3]},{"pos":23,"start":105,"end":107,"array_positions":[3]}]}},"fragments":{"reviews.content":["…ays since I was working at the \u003cmark\u003eLA\u003c/mark\u003e Auto Show at the convention center. Last year I stayed at the Westin (see review). So, I have to admit that this location is definitly MUCH better. Much more within a…"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"match":"La Rue Saint Denis!!","field":"reviews.content","prefix_length":0,"fuzziness":0,"operator":"or"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":{"Countries Referenced":{"size":5,"field":"country"}},"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":102,"max_score":1.1060123561061241,"took":7221735,"facets":{"Countries Referenced":{"field":"country","total":192,"missing":0,"other":0,"terms":[{"term":"united","count":90},{"term":"kingdom","count":49},{"term":"states","count":41},{"term":"france","count":12}]}}}
  • DocId Query, showing results of a query on two document IDs.

    ----> {"indexName":"travel-sample-index-unstored","query":{"ids":["hotel_26223","hotel_28960"]}}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_6ddbfb54","id":"hotel_28960","score":1,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"hotel_26223","score":1,"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"ids":["hotel_26223","hotel_28960"]},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":2,"max_score":1,"took":111182,"facets":null}
  • Unanalyzed Term Query with Fuzziness Level of 0, demonstrating how to query on a term with no analysis. Zero fuzziness is specified, to ensure that matches are exact.

    ----> {"indexName":"travel-sample-index-stored","size":50,"highlight":{"style":"html"},"query":{"field":"reviews.content","term":"sushi"}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_16527","score":0.5115191736068728,"locations":{"reviews.content":{"sushi":[{"pos":168,"start":898,"end":903,"array_positions":[5]},{"pos":193,"start":1040,"end":1045,"array_positions":[5]}]}},"fragments":{"reviews.content":["…aff were superb. Sancho's \u003cmark\u003eSushi\u003c/mark\u003e Bar was the only disappointment - food was not good and prices were too high. Coming from San Francisco and Washington DC we have great \u003cmark\u003esushi\u003c/mark\u003e restaurants. Sancho's coul…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_23198","score":0.45801365906648533,"locations":{"reviews.content":{"sushi":[{"pos":209,"start":1121,"end":1126,"array_positions":[0]},{"pos":215,"start":1150,"end":1155,"array_positions":[0]}]}},"fragments":{"reviews.content":["… Encore/Wynn. Starbucks for breakfast is half the price of the cafe in the hotel. Also, \u003cmark\u003eSushi\u003c/mark\u003e Ra has good half price \u003cmark\u003esushi\u003c/mark\u003e from 5 - 7pm. (4) Boarding pass: Encore/Wynn lets you print it for free in th…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_21844","score":0.40346491995392636,"locations":{"reviews.content":{"sushi":[{"pos":160,"start":927,"end":932,"array_positions":[4]}]}},"fragments":{"reviews.content":["The staff was extremely friendly and helpful. The hotel rooms on the upper floors are much nicer than the ones on the ground level floors (1 and 2). There can be slight problems with the toilets and a…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_21727","score":0.3912784675348057,"locations":{"reviews.content":{"sushi":[{"pos":683,"start":3587,"end":3592,"array_positions":[0]}]}},"fragments":{"reviews.content":["…quite absurd. $13 for a cocktail (plus tip?). A hot dog will cost you $12 (each). I ordered some \u003cmark\u003esushi\u003c/mark\u003e and beers on the beach and rang up a $70 bill for a snack...gimme a break. Overall, a beautiful r…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_40356","score":0.36142488594737326,"locations":{"reviews.content":{"sushi":[{"pos":436,"start":2370,"end":2375,"array_positions":[7]},{"pos":444,"start":2415,"end":2420,"array_positions":[7]}]}},"fragments":{"reviews.content":["…he road (if you can ignore all of the scary people hanging around at night), and the \u003cmark\u003esushi\u003c/mark\u003e restaurant, Shinto is to die for! Best \u003cmark\u003esushi\u003c/mark\u003e, and affordable, that I have ever had! Overall we had a great st…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_1362","score":0.3512671018970044,"locations":{"reviews.content":{"sushi":[{"pos":347,"start":1749,"end":1754,"array_positions":[1]}]}},"fragments":{"reviews.content":["…Q as you watch the sunset from your balcony is pretty great! We ate out at SANSEI in Kapalua for \u003cmark\u003esushi\u003c/mark\u003e and it was quite good. This is a great condo style set up for familys or couples, and its so nice…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_21889","score":0.3444751401787315,"locations":{"reviews.content":{"sushi":[{"pos":359,"start":1956,"end":1961,"array_positions":[0]},{"pos":167,"start":899,"end":904,"array_positions":[6]}]}},"fragments":{"reviews.content":["…and those who want privacy. I saw some couple with kids, but not much. Overall, I love Ritz Carlton! The place has a \u003cmark\u003esushi\u003c/mark\u003e bar, lounge, the famous Banyan Tree restaurant, a beach restaurant, etc. YOU …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_33342","score":0.3165258739135141,"locations":{"reviews.content":{"sushi":[{"pos":176,"start":891,"end":896,"array_positions":[0]}]}},"fragments":{"reviews.content":["…ners at the hotel. The Strip house has the best salad, Blossoms was a great family style chinese/\u003cmark\u003esushi\u003c/mark\u003e meal. The italian restaurant food was fabulous ( service was a little slow). Our most favorite pl…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_15917","score":0.30752103535561687,"locations":{"reviews.content":{"sushi":[{"pos":214,"start":1085,"end":1090,"array_positions":[1]},{"pos":225,"start":1145,"end":1150,"array_positions":[1]}]}},"fragments":{"reviews.content":["…g center across the street from resort. There is also a nice small \u003cmark\u003esushi\u003c/mark\u003e bar about a block up the street that served excellent \u003cmark\u003esushi\u003c/mark\u003e and the miso soup was to die for. I visited a few other hotels in t…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_26140","score":0.27872942708496573,"locations":{"reviews.content":{"sushi":[{"pos":170,"start":944,"end":949,"array_positions":[6]}]}},"fragments":{"reviews.content":["…it was worth it. The hotel also provides a car service and is also convenient to the SF public transportation system. Restaurants close by can be touristy but I enjoyed a small \u003cmark\u003esushi\u003c/mark\u003e place on Hyde: Gr…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_25809","score":0.2689145863880359,"locations":{"reviews.content":{"sushi":[{"pos":269,"start":1408,"end":1413,"array_positions":[3]}]}},"fragments":{"reviews.content":["…nd around 10 minutes to the China Ferry Terminal (Macau). There is no restaurant on site, but there is a bar on level 1 - numerous eating places right outside including a great \u003cmark\u003esushi\u003c/mark\u003e place and a 7/11 …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_21729","score":0.2600991689671452,"locations":{"reviews.content":{"sushi":[{"pos":88,"start":450,"end":455,"array_positions":[5]},{"pos":114,"start":583,"end":588,"array_positions":[5]}]}},"fragments":{"reviews.content":["…s amazing. The next day we ate \u003cmark\u003eSushi\u003c/mark\u003e at Kincha's. Two buffets and an additional Rainbow Roll, plus a tea and glass of wine and we walked out the door for $160. The \u003cmark\u003esushi\u003c/mark\u003e, even for a buffet, was as goo…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_16630","score":0.25801422183894807,"locations":{"reviews.content":{"sushi":[{"pos":154,"start":793,"end":798,"array_positions":[0]}]}},"fragments":{"reviews.content":["…fied.\" There are many restaurants within walking distance so no need to drive around. We enjoyed \"Silk\" --they serve \u003cmark\u003esushi\u003c/mark\u003e, and chinese cuisine. Parking is a bit much at $20/day valet or $15 self-park…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_15918","score":0.24681967712010963,"locations":{"reviews.content":{"sushi":[{"pos":366,"start":1975,"end":1980,"array_positions":[7]}]}},"fragments":{"reviews.content":["…ocean close to the beach. It's included in your stay. The hotel has a few different restaurants- \u003cmark\u003esushi\u003c/mark\u003e, steak, italian, breakfast buffet. Did all of them except for the italian. Enjoyed all of them, l…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_15915","score":0.2374830627410517,"locations":{"reviews.content":{"sushi":[{"pos":530,"start":2790,"end":2795,"array_positions":[5]}]}},"fragments":{"reviews.content":["…blocks down, then a sharp right.. there is a restaurant called Tangerine/ Liquid. And a roof top \u003cmark\u003esushi\u003c/mark\u003e bar on the 17th foor, open roof that overlooks the ocean. Prices are ok. There is also local shop…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_16180","score":0.23675288624349838,"locations":{"reviews.content":{"sushi":[{"pos":64,"start":350,"end":355,"array_positions":[6]}]}},"fragments":{"reviews.content":["…nt theme everyday were good. The Japanese restaurant served a great salmon, but you will not get \u003cmark\u003esushi\u003c/mark\u003e or shimie in any quantity or quality. The other two were Caribbean and a Steak house, which were …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_16237","score":0.23097346570500746,"locations":{"reviews.content":{"sushi":[{"pos":1591,"start":8923,"end":8928,"array_positions":[1]},{"pos":1614,"start":9058,"end":9063,"array_positions":[1]}]}},"fragments":{"reviews.content":["…sented with a lovely plate of \u003cmark\u003esushi\u003c/mark\u003e and a menu. Next you are given a choice of several starters, entrees and dessert. We thoroughly enjoyed the Dominican version of \u003cmark\u003esushi\u003c/mark\u003e, then tempura, a wonderful sh…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_37318","score":0.19489984486324483,"locations":{"reviews.content":{"sushi":[{"pos":247,"start":1287,"end":1292,"array_positions":[6]}]}},"fragments":{"reviews.content":["…Our kids, who are not adventurous eaters, had to be convinced that there would be more than just \u003cmark\u003eSushi\u003c/mark\u003e at the Japanese restaurant. They were pleasantly surprised. In fact, it was their favorite restau…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_21723","score":0.17645695052787527,"locations":{"reviews.content":{"sushi":[{"pos":605,"start":3178,"end":3183,"array_positions":[8]}]}},"fragments":{"reviews.content":["…d dinner at humuhumunukunukuapuaa and it was very nice. My wife had lobster and steak, and I had \u003cmark\u003esushi\u003c/mark\u003e and fresh fish ceviche. Both were nicely prepared. They told me the fridge would be $25 for the w…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_16045","score":0.14692885515216011,"locations":{"reviews.content":{"sushi":[{"pos":731,"start":3846,"end":3851,"array_positions":[6]}]}},"fragments":{"reviews.content":["…got a reservation at the Oriental Restaurant (the entr茅e was so overcooked, it was inedible. The \u003cmark\u003esushi\u003c/mark\u003e was good.).Friday morning we ate the buffet breakfast (one side is more American and one side Eur…"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"term":"sushi","field":"reviews.content"},"size":50,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":20,"max_score":0.5115191736068728,"took":687046,"facets":null}
  • Unanalyzed Term Query with Fuzziness Level of 2, which is almost identical to the immediately preceding query; but which this time specifies a fuzziness factor of 2, allowing partial matches to be made. The output from this query can be compared to that of the one immediately preceding.

    ----> {"indexName":"travel-sample-index-stored","size":50,"highlight":{"style":"html"},"query":{"field":"reviews.content","fuzziness":2,"term":"sushi"}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_9905","score":0.1447082094709048,"locations":{"reviews.content":{"bush":[{"pos":109,"start":640,"end":644,"array_positions":[3]}],"rush":[{"pos":64,"start":357,"end":361,"array_positions":[3]}]}},"fragments":{"reviews.content":["…l, it was spotlessly clean. I liked the breakfast area, although it did get a bit noisy when the \"\u003cmark\u003erush\u003c/mark\u003e\" hit about 8:00 a.m. on a Saturday morning. The room was similarly clean and comfortable. The wir…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_21727","score":0.13457791408633243,"locations":{"reviews.content":{"lush":[{"pos":68,"start":369,"end":373,"array_positions":[1]}],"sushi":[{"pos":683,"start":3587,"end":3592,"array_positions":[0]}]}},"fragments":{"reviews.content":["…quite absurd. $13 for a cocktail (plus tip?). A hot dog will cost you $12 (each). I ordered some \u003cmark\u003esushi\u003c/mark\u003e and beers on the beach and rang up a $70 bill for a snack...gimme a break. Overall, a beautiful r…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_21723","score":0.10588210962113358,"locations":{"reviews.content":{"lush":[{"pos":40,"start":199,"end":203,"array_positions":[5]}],"rush":[{"pos":252,"start":1367,"end":1371,"array_positions":[6]}],"slush":[{"pos":732,"start":3827,"end":3832,"array_positions":[8]}],"sushi":[{"pos":605,"start":3178,"end":3183,"array_positions":[8]}]}},"fragments":{"reviews.content":["…o relax. The hotel is set in beautiful grounds with water features and sculptures everywhere. The \u003cmark\u003elush\u003c/mark\u003e gardens are constantly being worked on - we thought they were beautifully kept. The hotel's facil…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_33899","score":0.10480406598230554,"locations":{"reviews.content":{"lush":[{"pos":105,"start":584,"end":588,"array_positions":[2]},{"pos":13,"start":84,"end":88,"array_positions":[4]}],"rush":[{"pos":228,"start":1288,"end":1292,"array_positions":[4]}]}},"fragments":{"reviews.content":["…elf was magnificent and very clean. The landscaping was extremely well taken care of, it was very \u003cmark\u003elush\u003c/mark\u003e and tropical. The facilities were very good and pretty much offered anything that you could imagi…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_26211","score":0.07063424993300373,"locations":{"reviews.content":{"push":[{"pos":114,"start":603,"end":607,"array_positions":[6]}],"sisli":[{"pos":20,"start":102,"end":107,"array_positions":[1]}],"xishi":[{"pos":33,"start":188,"end":193,"array_positions":[3]}]}},"fragments":{"reviews.content":["…e at a nearby hotel. for four nights at the Mamara \u003cmark\u003eSisli\u003c/mark\u003e hotel. The hotel is not in the main tourist area, and it is quite expensive to get there by cab (I didn't have adequate Turkish or stamina to t…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_12924","score":0.06130418173247418,"locations":{"reviews.content":{"mushy":[{"pos":108,"start":554,"end":559,"array_positions":[3]}],"sasha":[{"pos":132,"start":703,"end":708,"array_positions":[4]}]}},"fragments":{"reviews.content":["… and it got loud. We could also hear people on the street so this may not be a big problem now, it could a problem for some at peak season. The bed was \u003cmark\u003emushy\u003c/mark\u003e, thankfully I didn't wake up with a back a…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_21729","score":0.05952962901832172,"locations":{"reviews.content":{"rush":[{"pos":293,"start":1506,"end":1510,"array_positions":[7]}],"sushi":[{"pos":88,"start":450,"end":455,"array_positions":[5]},{"pos":114,"start":583,"end":588,"array_positions":[5]}]}},"fragments":{"reviews.content":["…s amazing. The next day we ate \u003cmark\u003eSushi\u003c/mark\u003e at Kincha's. Two buffets and an additional Rainbow Roll, plus a tea and glass of wine and we walked out the door for $160. The \u003cmark\u003esushi\u003c/mark\u003e, even for a buffet, was as goo…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_21845","score":0.05666025238268102,"locations":{"reviews.content":{"lush":[{"pos":7,"start":37,"end":41,"array_positions":[1]}]}},"fragments":{"reviews.content":["…kena. Property is \u003cmark\u003elush\u003c/mark\u003e, beach is nice. Room was spacious. very reasonably priced compared to wailea. nice breakfast buffet. Nice touches at the pool. Servers with water and frozen grapes. Food at pool…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_32172","score":0.05162526868803317,"locations":{"reviews.content":{"lush":[{"pos":78,"start":398,"end":402,"array_positions":[0]}]}},"fragments":{"reviews.content":["… ever stay, coming almost every year when we can. We love the proximity to Main St. and all the restuarants and shopping. We absoutly love the \u003cmark\u003elush\u003c/mark\u003e and beautiful gardens the pools and piece and Quite.…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_21725","score":0.04196935945680559,"locations":{"reviews.content":{"pushy":[{"pos":89,"start":485,"end":490,"array_positions":[0]}],"rush":[{"pos":843,"start":4418,"end":4422,"array_positions":[0]}]}},"fragments":{"reviews.content":["…lax there, not worry about racing for good seats, there are not 1000's of screaming children and \u003cmark\u003epushy\u003c/mark\u003e adults. I just dont know how else to describe it other than \"down market,\" which is not how a hot…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_3623","score":0.03880039965703977,"locations":{"reviews.content":{"push":[{"pos":280,"start":1522,"end":1526,"array_positions":[0]}]}},"fragments":{"reviews.content":["…woman behind the front desk left her spot as I walked in the lobby and beat me to the elevator to \u003cmark\u003epush\u003c/mark\u003e the buttons for me (both outside the elevator and in), I was impressed; I soon came to expect tha…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_25798","score":0.03798801962666054,"locations":{"reviews.content":{"push":[{"pos":366,"start":2028,"end":2032,"array_positions":[2]},{"pos":502,"start":2719,"end":2723,"array_positions":[2]}]}},"fragments":{"reviews.content":["…ll, a very attractive room, with automatic curtains so you can just lie in bed in the morning and \u003cmark\u003epush\u003c/mark\u003e a button to see the view of the canal (and people breakfasting at the hotel opposite). Our daught…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_16436","score":0.037757007718035085,"locations":{"reviews.content":{"lush":[{"pos":69,"start":390,"end":394,"array_positions":[3]}],"rush":[{"pos":401,"start":2071,"end":2075,"array_positions":[7]}]}},"fragments":{"reviews.content":["…r opinion of the resort and the (non-existing) customer service:Grounds: Beautiful landscape with \u003cmark\u003elush\u003c/mark\u003e greenery, lagoons, fish, flamingoes and, among other wild life, a bunch of geese. One of them, a …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_12242","score":0.03746367785606021,"locations":{"reviews.content":{"rush":[{"pos":58,"start":306,"end":310,"array_positions":[0]}]}},"fragments":{"reviews.content":["…the Hospital. The Interstate is right there and only a 15 minute drive to downtown, except during \u003cmark\u003erush\u003c/mark\u003e hour. The staff was friendly and helpful (save for one of the women who took care of the breakfas…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_7387","score":0.03727408874671707,"locations":{"reviews.content":{"rush":[{"pos":683,"start":3645,"end":3649,"array_positions":[1]}]}},"fragments":{"reviews.content":["…ch nicer/cleaner. We were running late on our way back to the airport (and it was at the start of \u003cmark\u003erush\u003c/mark\u003e hour), but he knew the shortcuts and still got us to the airport in just over 30 minutes. Also: O…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_21844","score":0.03565168401900037,"locations":{"reviews.content":{"sushi":[{"pos":160,"start":927,"end":932,"array_positions":[4]}]}},"fragments":{"reviews.content":["The staff was extremely friendly and helpful. The hotel rooms on the upper floors are much nicer than the ones on the ground level floors (1 and 2). There can be slight problems with the toilets and a…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_21852","score":0.03447494168235994,"locations":{"reviews.content":{"lush":[{"pos":143,"start":754,"end":758,"array_positions":[0]},{"pos":97,"start":538,"end":542,"array_positions":[4]}]}},"fragments":{"reviews.content":["…t well for us though. We got on the top floor \u0026 had a garden view, but when your view overlooks a \u003cmark\u003elush\u003c/mark\u003e golf course \u0026 a mountain, it's still not bad, so I didnt miss that we couldnt really see the ocea…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_16527","score":0.0328110214969065,"locations":{"reviews.content":{"sushi":[{"pos":168,"start":898,"end":903,"array_positions":[5]},{"pos":193,"start":1040,"end":1045,"array_positions":[5]}]}},"fragments":{"reviews.content":["…aff were superb. Sancho's \u003cmark\u003eSushi\u003c/mark\u003e Bar was the only disappointment - food was not good and prices were too high. Coming from San Francisco and Washington DC we have great \u003cmark\u003esushi\u003c/mark\u003e restaurants. Sancho's coul…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_25596","score":0.032447069719011096,"locations":{"reviews.content":{"susan":[{"pos":28,"start":174,"end":179,"array_positions":[1]}]}},"fragments":{"reviews.content":["…r Union Square, amazing value and super friendly and helpful staff. Special mention to \u003cmark\u003eSusan\u003c/mark\u003e who helped us with last minute city trip and airport transfer. The place has a really charming ambience and…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_23198","score":0.029378949585684384,"locations":{"reviews.content":{"sushi":[{"pos":209,"start":1121,"end":1126,"array_positions":[0]},{"pos":215,"start":1150,"end":1155,"array_positions":[0]}]}},"fragments":{"reviews.content":["… Encore/Wynn. Starbucks for breakfast is half the price of the cafe in the hotel. Also, \u003cmark\u003eSushi\u003c/mark\u003e Ra has good half price \u003cmark\u003esushi\u003c/mark\u003e from 5 - 7pm. (4) Boarding pass: Encore/Wynn lets you print it for free in th…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_32861","score":0.029224826417803666,"locations":{"reviews.content":{"lush":[{"pos":14,"start":79,"end":83,"array_positions":[0]}]}},"fragments":{"reviews.content":["Loved it and everything about it! Am planning to return soon! Amazing service, \u003cmark\u003elush\u003c/mark\u003e rooms with views to die for! Beautiful poor area and great bar staff."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_3611","score":0.028944736969211397,"locations":{"reviews.content":{"rush":[{"pos":99,"start":538,"end":542,"array_positions":[0]}]}},"fragments":{"reviews.content":["…l compliment. The offer of a glass of wine when I first entered the lobby after stressing through \u003cmark\u003erush\u003c/mark\u003e hour traffic was very welcome. I know there have been lots of complaints about noise but we had a…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_12238","score":0.028765091379839108,"locations":{"reviews.content":{"susan":[{"pos":30,"start":147,"end":152,"array_positions":[0]},{"pos":73,"start":375,"end":380,"array_positions":[0]}]}},"fragments":{"reviews.content":["…all the way to US 192 to find a hotel. I spoke with a lovely woman named \u003cmark\u003eSusan\u003c/mark\u003e to see it they had vacancies and we were pleased to hear that they did. Upon arrival, we stopped at a guardhouse with sec…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_12923","score":0.02759553852192764,"locations":{"reviews.content":{"rush":[{"pos":167,"start":969,"end":973,"array_positions":[6]}]}},"fragments":{"reviews.content":["…with 2 lattes was $50. While opting for convience we were actually delayed, gobbled our food in a \u003cmark\u003erush\u003c/mark\u003e, and made late to our appointment with Far Niente. Overall, great hotel, but avoid the restaurant…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_25670","score":0.025817927796274585,"locations":{"reviews.content":{"hush":[{"pos":57,"start":278,"end":282,"array_positions":[7]}]}},"fragments":{"reviews.content":["…the only hint of what a great place this is. Our room moved us from the hustle of downtown to the \u003cmark\u003ehush\u003c/mark\u003e of a sweet large room set up like a charming home, with a fireplace, french doors over a terrace,…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_25801","score":0.025799683875495236,"locations":{"reviews.content":{"lush":[{"pos":106,"start":549,"end":553,"array_positions":[1]}]}},"fragments":{"reviews.content":["…ll they have put a lot of thought and pride in the furnishings and decor - everything was new and \u003cmark\u003elush\u003c/mark\u003e. We stayed on the top floor and one of the bedrooms was in the turret, which was quite special. Y…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_2483","score":0.025714695663631146,"locations":{"reviews.content":{"pushy":[{"pos":97,"start":543,"end":548,"array_positions":[2]}]}},"fragments":{"reviews.content":["… although I was aware of their cancellation policy (I should note that I was rather impolite and \u003cmark\u003epushy\u003c/mark\u003e, but they put up with me and were very patient). Their staff recited their policy as I had expect…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_21649","score":0.024997569779925535,"locations":{"reviews.content":{"push":[{"pos":731,"start":3810,"end":3814,"array_positions":[0]}]}},"fragments":{"reviews.content":["…er's hand. She was still in the elevator and I had to put my body in the door of the elevator and \u003cmark\u003epush\u003c/mark\u003e it open. My daughter was screaming and I was completely panicked. The same thing happened to my h…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_38525","score":0.024583837464192605,"locations":{"reviews.content":{"lush":[{"pos":324,"start":1717,"end":1721,"array_positions":[1]}]}},"fragments":{"reviews.content":["…e beach, but we were happy with the set-up of the pool areas. As for the complaints about lack of \u003cmark\u003elush\u003c/mark\u003e vegetation, again-I feel that the people complaining just don't understand the design. There was …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_14005","score":0.024435929745638147,"locations":{"reviews.content":{"rush":[{"pos":321,"start":1763,"end":1767,"array_positions":[0]}]}},"fragments":{"reviews.content":["…taurant, and it was really worth it. The food was great and the athmosphere quite nice. We had to \u003cmark\u003erush\u003c/mark\u003e out though, since the children had heard about \"smors\" session at the \"beach\" and it was about to…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_1362","score":0.02421679276309202,"locations":{"reviews.content":{"sushi":[{"pos":347,"start":1749,"end":1754,"array_positions":[1]}]}},"fragments":{"reviews.content":["…Q as you watch the sunset from your balcony is pretty great! We ate out at SANSEI in Kapalua for \u003cmark\u003esushi\u003c/mark\u003e and it was quite good. This is a great condo style set up for familys or couples, and its so nice…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_16630","score":0.02279911103661969,"locations":{"reviews.content":{"sushi":[{"pos":154,"start":793,"end":798,"array_positions":[0]}]}},"fragments":{"reviews.content":["…fied.\" There are many restaurants within walking distance so no need to drive around. We enjoyed \"Silk\" --they serve \u003cmark\u003esushi\u003c/mark\u003e, and chinese cuisine. Parking is a bit much at $20/day valet or $15 self-park…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_26236","score":0.0226672810151682,"locations":{"reviews.content":{"push":[{"pos":250,"start":1382,"end":1386,"array_positions":[2]}]}},"fragments":{"reviews.content":["…you have to travel by taxi which ranges from 20 AEDs to 60+ AEDs. The hotel security staff try to \u003cmark\u003epush\u003c/mark\u003e private taxis and city tours which we found were were at least 300% costlier when we compared sim…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_26219","score":0.022029313120907404,"locations":{"reviews.content":{"lush":[{"pos":162,"start":822,"end":826,"array_positions":[2]}]}},"fragments":{"reviews.content":["…ut or you want to keep up your skills during a summer vacation. The grass on the soccer field was \u003cmark\u003elush\u003c/mark\u003e it felt like you were walking on a carpet, no holes and nice and level. A+ And for those of you w…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_23634","score":0.021739714258808288,"locations":{"reviews.content":{"push":[{"pos":209,"start":1057,"end":1061,"array_positions":[2]}]}},"fragments":{"reviews.content":["…that lifts the gate handle up. This happened three times that the gates would not open. We had to \u003cmark\u003epush\u003c/mark\u003e the assistance buzzer. The third time it happened my husband pushed the assistance buzzer but no …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_25667","score":0.021530662926702065,"locations":{"reviews.content":{"hush":[{"pos":169,"start":899,"end":903,"array_positions":[5]}]}},"fragments":{"reviews.content":["…counts to most anything you want to see. Also, if you want to see a show, go to the TIX stand (right accross from the hotel basically) for 1/2-price same-day shows. We saw \"\u003cmark\u003eHush\u003c/mark\u003e Up...Sweet Charolette\"…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_30018","score":0.021368650206674448,"locations":{"reviews.content":{"lush":[{"pos":75,"start":426,"end":430,"array_positions":[2]}]}},"fragments":{"reviews.content":["…ildings and destinations. The drinks were a little expensive, but it's a resort and expected. Hard floors were perfect for getting sand in the room and \u003cmark\u003elush\u003c/mark\u003e plants were perfect in creating the island …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_16458","score":0.020418097547174285,"locations":{"reviews.content":{"gushy":[{"pos":90,"start":544,"end":549,"array_positions":[4]}]}},"fragments":{"reviews.content":["…tart with reception: nice and discrete ground floor welcome, warm and enthusiastic without being \u003cmark\u003egushy\u003c/mark\u003e from an impeccably groomed and professional team. It also smelled gorgeous. We were terribly earl…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_2484","score":0.02017983949060119,"locations":{"reviews.content":{"push":[{"pos":20,"start":110,"end":114,"array_positions":[7]}]}},"fragments":{"reviews.content":["… it's only attached to Terminal 3 so you might need to \u003cmark\u003epush\u003c/mark\u003e bags and trolleys around for a while if you arrive at any other terminal - not the hotel's fault. Guests are mostly passengers in transit an…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_12240","score":0.02015225258532386,"locations":{"reviews.content":{"push":[{"pos":25,"start":120,"end":124,"array_positions":[2]}]}},"fragments":{"reviews.content":["… just incompetent. If your not hiring a car DO NOT let them \u003cmark\u003epush\u003c/mark\u003e Ceasers Transport on you. They're paid comission by this unreliable, over priced taxi firm. Insted look up a local taxi, which we found…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_8962","score":0.019768082806908838,"locations":{"reviews.content":{"lush":[{"pos":47,"start":250,"end":254,"array_positions":[4]}]}},"fragments":{"reviews.content":["…, Sea World, Old Town San Diego (great restaurants in Old Town), parks etc. The resort feels very \u003cmark\u003elush\u003c/mark\u003e with many pools to choose from, and the fire pits are a nice touch. Staff was helpful with direct…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_20738","score":0.018655401016647234,"locations":{"reviews.content":{"push":[{"pos":182,"start":1001,"end":1005,"array_positions":[4]}]}},"fragments":{"reviews.content":["…to the details of many of the offers and asks for proof from the guest. I'm sure they get lots of \u003cmark\u003epush\u003c/mark\u003e back considering the level of clientele staying in this hotel, but in my case since I had printed…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_15912","score":0.018424948398114756,"locations":{"reviews.content":{"pushy":[{"pos":310,"start":1603,"end":1608,"array_positions":[0]}]}},"fragments":{"reviews.content":["…nd loved having the option. There were a few tables of vendors selling jewelry and trinkets, not \u003cmark\u003epushy\u003c/mark\u003e at all and in fact I had to work my way thru the crowd of people around the tables to take a look…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_21889","score":0.018168262094237917,"locations":{"reviews.content":{"sushi":[{"pos":359,"start":1956,"end":1961,"array_positions":[0]},{"pos":167,"start":899,"end":904,"array_positions":[6]}]}},"fragments":{"reviews.content":["…and those who want privacy. I saw some couple with kids, but not much. Overall, I love Ritz Carlton! The place has a \u003cmark\u003esushi\u003c/mark\u003e bar, lounge, the famous Banyan Tree restaurant, a beach restaurant, etc. YOU …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_33896","score":0.0178679897843285,"locations":{"reviews.content":{"pushy":[{"pos":172,"start":890,"end":895,"array_positions":[8]}],"slush":[{"pos":352,"start":1915,"end":1920,"array_positions":[2]}]}},"fragments":{"reviews.content":["…y good.The drinks would be better if they were made with fresh fruit, instead of slushee machine \u003cmark\u003eslush\u003c/mark\u003e, however they were decent.The beds on the beach were amazing, but ignore the rules and reserve on…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_4398","score":0.017754407511884743,"locations":{"reviews.content":{"lush":[{"pos":17,"start":92,"end":96,"array_positions":[6]}]}},"fragments":{"reviews.content":["…it blew my expectations away. The grounds are \u003cmark\u003elush\u003c/mark\u003e and simply amazing so take a nice long walk. The country breakfast was a real treat, actually a huge spread. We had a couples massage in The Redwood …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_25809","score":0.017249328529746855,"locations":{"reviews.content":{"sushi":[{"pos":269,"start":1408,"end":1413,"array_positions":[3]}]}},"fragments":{"reviews.content":["…nd around 10 minutes to the China Ferry Terminal (Macau). There is no restaurant on site, but there is a bar on level 1 - numerous eating places right outside including a great \u003cmark\u003esushi\u003c/mark\u003e place and a 7/11 …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_40093","score":0.017191674819673815,"locations":{"reviews.content":{"rush":[{"pos":490,"start":2695,"end":2699,"array_positions":[2]}]}},"fragments":{"reviews.content":["… had an insanely early checkout time (five-ish in the a.m.), and Lindsay realized that I was in a \u003cmark\u003erush\u003c/mark\u003e to get to O'Hare/ORD for my morning cross-border flight back north. He noticed that I was getting…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_33894","score":0.01682731827292802,"locations":{"reviews.content":{"lush":[{"pos":621,"start":3407,"end":3411,"array_positions":[1]},{"pos":61,"start":319,"end":323,"array_positions":[5]}]}},"fragments":{"reviews.content":["…eserves a medal. the housekeeping staff and groundskeepers are wonderful and the surroundings are \u003cmark\u003elush\u003c/mark\u003e and beautiful.We really wanted to love this place but couldn't. The beautiful grounds couldn't ma…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_33342","score":0.016694165604765138,"locations":{"reviews.content":{"sushi":[{"pos":176,"start":891,"end":896,"array_positions":[0]}]}},"fragments":{"reviews.content":["…ners at the hotel. The Strip house has the best salad, Blossoms was a great family style chinese/\u003cmark\u003esushi\u003c/mark\u003e meal. The italian restaurant food was fabulous ( service was a little slow). Our most favorite pl…"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"term":"sushi","prefix_length":0,"fuzziness":2,"field":"reviews.content"},"size":50,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":99,"max_score":0.1447082094709048,"took":8071632,"facets":null}
  • Match Phrase Query, using Analysis, for searching on a phrase.

    ----> {"indexName":"travel-sample-index-stored","size":10,"highlight":{"style":"html"},"query":{"field":"description","match_phrase":"Eiffel Tower"}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_21726","score":2.6355418515879965,"locations":{"description":{"eiffel":[{"pos":19,"start":107,"end":113,"array_positions":null}],"tower":[{"pos":20,"start":114,"end":119,"array_positions":null}]}},"fragments":{"description":["The executive and deluxe rooms offer a breathtaking views of the Louvre, the Jardin des Tuileries, and the \u003cmark\u003eEiffel\u003c/mark\u003e \u003cmark\u003eTower\u003c/mark\u003e. Classic Parisian-style hotel next to shopping and cultural hot spots."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_21652","score":2.3882543011509223,"locations":{"description":{"eiffel":[{"pos":11,"start":53,"end":59,"array_positions":null}],"tower":[{"pos":12,"start":60,"end":65,"array_positions":null}]}},"fragments":{"description":["…e hotel very close to the \u003cmark\u003eEiffel\u003c/mark\u003e \u003cmark\u003eTower\u003c/mark\u003e, in a nice, quiet and green area of Grenelle. Despite the closeness, only about a quarter of the rooms, designated as such and commanding higher rates, feature a…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_21675","score":2.0541928282431576,"locations":{"description":{"eiffel":[{"pos":30,"start":164,"end":170,"array_positions":null}],"tower":[{"pos":31,"start":171,"end":176,"array_positions":null}]}},"fragments":{"description":["…djacent to the Palais du Congres. It enjoys an unobstructed line of sight towards the \u003cmark\u003eEiffel\u003c/mark\u003e \u003cmark\u003eTower\u003c/mark\u003e from the rooms facing it and its top-floor bar. After Hyatt took over the property, it is being gradu…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_21657","score":1.9430718762111634,"locations":{"description":{"eiffel":[{"pos":33,"start":192,"end":198,"array_positions":null}],"tower":[{"pos":34,"start":199,"end":204,"array_positions":null}]}},"fragments":{"description":["…and underwent extensive renovation to its rooms and public spaces. It continues to offer close-up views of the \u003cmark\u003eEiffel\u003c/mark\u003e \u003cmark\u003eTower\u003c/mark\u003e from the balconies of its relatively spacious for Paris Deluxe (32 sqm) and …"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"match_phrase":"Eiffel Tower","field":"description"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":4,"max_score":2.6355418515879965,"took":378475,"facets":null}
  • Phrase Query, without Analysis, for searching on a phrase without analysis supported.

    ----> {"indexName":"travel-sample-index-stored","size":10,"highlight":{"style":"html"},"query":{"field":"description","terms":["dorm","rooms"]}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_6351","score":3.66056027016252,"locations":{"description":{"dorm":[{"pos":5,"start":26,"end":30,"array_positions":null}],"rooms":[{"pos":6,"start":31,"end":36,"array_positions":null}]}},"fragments":{"description":["Ensuite private rooms and \u003cmark\u003edorm\u003c/mark\u003e \u003cmark\u003erooms\u003c/mark\u003e. Reception open from 0800-1030 and 1500-2230."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_20956","score":3.6086540532893583,"locations":{"description":{"dorm":[{"pos":3,"start":14,"end":18,"array_positions":null}],"rooms":[{"pos":4,"start":19,"end":24,"array_positions":null}]}},"fragments":{"description":["small ensuite \u003cmark\u003edorm\u003c/mark\u003e \u003cmark\u003erooms\u003c/mark\u003e and private guest rooms, sea-front location."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_25324","score":3.363422281385767,"locations":{"description":{"dorm":[{"pos":7,"start":34,"end":38,"array_positions":null}],"rooms":[{"pos":8,"start":39,"end":44,"array_positions":null}]}},"fragments":{"description":["A friendly and clean hostel, with \u003cmark\u003edorm\u003c/mark\u003e \u003cmark\u003erooms\u003c/mark\u003e at $17-19/night and private rooms in the $40 range."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_22460","score":2.927333486354325,"locations":{"description":{"dorm":[{"pos":4,"start":17,"end":21,"array_positions":null}],"rooms":[{"pos":5,"start":22,"end":27,"array_positions":null}]}},"fragments":{"description":["Twin, double and \u003cmark\u003edorm\u003c/mark\u003e \u003cmark\u003erooms\u003c/mark\u003e are available plus a wonderful sunny lounge, overlooking the main street."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_25152","score":2.7462228531301713,"locations":{"description":{"dorm":[{"pos":21,"start":101,"end":105,"array_positions":null}],"rooms":[{"pos":22,"start":106,"end":111,"array_positions":null}]}},"fragments":{"description":["Hostel with easy access to the historic Gaslamp District. They have 4-bed and 6-bed female and co-ed \u003cmark\u003edorm\u003c/mark\u003e \u003cmark\u003erooms\u003c/mark\u003e as well as some private rooms."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_24606","score":2.0606939023227353,"locations":{"description":{"dorm":[{"pos":26,"start":144,"end":148,"array_positions":null}],"rooms":[{"pos":27,"start":149,"end":154,"array_positions":null}]}},"fragments":{"description":["…nside Kinloch Castle, but due to the deteriorating condition, it has moved into an adjacent temporary building. It has 8 \u003cmark\u003edorm\u003c/mark\u003e \u003cmark\u003erooms\u003c/mark\u003e, each with 4 beds. All accommodation is self-catering, with a kitche…"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"terms":["dorm","rooms"],"field":"description"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":6,"max_score":3.66056027016252,"took":183167,"facets":null}
  • Query String Query, showing how a query string is specified as search-input.

    ----> {"indexName":"travel-sample-index-unstored","size":10,"query":{"query":"description: Imperial"}}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"hotel_26223","score":1.0839661760870005,"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"query":"description: Imperial"},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":1,"max_score":1.0839661760870005,"took":121026,"facets":null}
  • Conjunction Query, whereby two separate queries are defined and then run as part of the search, with only the matches returned by both included in the result-object.

    ----> {"indexName":"travel-sample-index-stored","size":10,"highlight":{"style":"html"},"query":{"conjuncts":[{"field":"reviews.content","match":"La Rue Saint Denis!!"},{"field":"description","match":"boutique"}]}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_26223","score":1.3959054545023135,"locations":{"description":{"boutique":[{"pos":6,"start":26,"end":34,"array_positions":null}]},"reviews.content":{"denis":[{"pos":88,"start":443,"end":448,"array_positions":[0]}],"la":[{"pos":85,"start":430,"end":432,"array_positions":[0]}],"rue":[{"pos":86,"start":433,"end":436,"array_positions":[0]}],"saint":[{"pos":87,"start":437,"end":442,"array_positions":[0]}]}},"fragments":{"description":["…hotel with a \u003cmark\u003eboutique\u003c/mark\u003e feel and very large bathrooms. Rooms are equipped with high-speed Internet, stereos and large flat panel televisions, and you can ask for the few rooms with Japanese style amenit…"],"reviews.content":["…libre had thieves? After all, this is supposed to be a 4 stars hotel, not a bedsit next to \u003cmark\u003eLa\u003c/mark\u003e \u003cmark\u003eRue\u003c/mark\u003e \u003cmark\u003eSaint\u003c/mark\u003e \u003cmark\u003eDenis\u003c/mark\u003e!!! I complained to the manager, Ms. Laura Lamblin, who told me that I had to go to the pol…"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_16349","score":0.8796689449270705,"locations":{"description":{"boutique":[{"pos":3,"start":10,"end":18,"array_positions":null}]},"reviews.content":{"la":[{"pos":124,"start":654,"end":656,"array_positions":[1]},{"pos":3,"start":12,"end":14,"array_positions":[3]}]}},"fragments":{"description":["Four star \u003cmark\u003eboutique\u003c/mark\u003e hotel popular with business travelers with its sleek and contemporary design and furnishings."],"reviews.content":["…s, etc. etc. etc.The food was very good for the most part. There were plenty of choices. The two a-\u003cmark\u003ela\u003c/mark\u003e-carte restaurants were average. I found the food better at the buffet restaurant in the hotel.The …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_25245","score":0.7530974096057772,"locations":{"description":{"boutique":[{"pos":10,"start":48,"end":56,"array_positions":null}]},"reviews.content":{"la":[{"pos":78,"start":449,"end":451,"array_positions":[4]}]}},"fragments":{"description":["Right on the Pacific Ocean and features a retro \u003cmark\u003eboutique\u003c/mark\u003e-style décor, a popular onsite restaurant, and private guestroom balconies."],"reviews.content":["…quired, presentation was beautiful, taste was excellent and variety was always a pleasant surprise! The staff always went above and beyond to see to our every request. Linda Alumbaugh, Baton Rouge, \u003cmark\u003eLA\u003c/mark\u003e"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_25166","score":0.6894979469980613,"locations":{"description":{"boutique":[{"pos":11,"start":54,"end":62,"array_positions":null}]},"reviews.content":{"la":[{"pos":76,"start":373,"end":375,"array_positions":[2]},{"pos":101,"start":509,"end":511,"array_positions":[2]}]}},"fragments":{"description":["Formerly the Se Sean Diego, now a Kimpton Hotel. This \u003cmark\u003eboutique\u003c/mark\u003e hotel is near Horton Square and a few blocks from the Gaslamp District. Rates start at $159 a night."],"reviews.content":["…om the beach and you can go to \u003cmark\u003eLa\u003c/mark\u003e Sagrada Familia even walking, the metro is right behind the hotel. We discovered the area and it is beatiful, specially if you go to \u003cmark\u003ela\u003c/mark\u003e Rambla del Poblenou with amazi…"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"conjuncts":[{"match":"La Rue Saint Denis!!","field":"reviews.content","prefix_length":0,"fuzziness":0,"operator":"or"},{"match":"boutique","field":"description","prefix_length":0,"fuzziness":0,"operator":"or"}]},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":4,"max_score":1.3959054545023135,"took":285987,"facets":null}
  • Wild Card Query, whereby a wildcard is used in the string submitted for the search.

    ----> {"indexName":"travel-sample-index-stored","size":10,"highlight":{"style":"html"},"query":{"field":"description","wildcard":"bouti*ue"}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_21663","score":3.584615143683038,"locations":{"description":{"boutique":[{"pos":3,"start":7,"end":15,"array_positions":null}]}},"fragments":{"description":["3-star \u003cmark\u003eboutique\u003c/mark\u003e hotel."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_635","score":3.2510360559760345,"locations":{"description":{"boutique":[{"pos":5,"start":18,"end":26,"array_positions":null}]}},"fragments":{"description":["4 stat town house \u003cmark\u003eboutique\u003c/mark\u003e hotel."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_13aa53f3","id":"hotel_16686","score":3.206177215390049,"locations":{"description":{"boutique":[{"pos":4,"start":14,"end":22,"array_positions":null}]}},"fragments":{"description":["4 star luxury \u003cmark\u003eboutique\u003c/mark\u003e hotel."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_16448","score":2.694909872488883,"locations":{"description":{"boutique":[{"pos":1,"start":0,"end":8,"array_positions":null}]}},"fragments":{"description":["\u003cmark\u003eBoutique\u003c/mark\u003e townhouse rooms and accommodation just off Kensington High Street."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_1501","score":2.694035322713864,"locations":{"description":{"boutique":[{"pos":2,"start":5,"end":13,"array_positions":null}]}},"fragments":{"description":["This \u003cmark\u003eboutique\u003c/mark\u003e hotel offers five unique food and beverage venues."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_25599","score":2.610662777382389,"locations":{"description":{"boutique":[{"pos":2,"start":2,"end":10,"array_positions":null}]}},"fragments":{"description":["A \u003cmark\u003eboutique\u003c/mark\u003e hotel, favored by musicians of all stripes, with free parking and breakfast."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_16522","score":2.5650913444173966,"locations":{"description":{"boutique":[{"pos":5,"start":21,"end":29,"array_positions":null}]}},"fragments":{"description":["A charming four star \u003cmark\u003eboutique\u003c/mark\u003e hotel near Victoria station."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_21849","score":2.5407855132362815,"locations":{"description":{"boutique":[{"pos":3,"start":10,"end":18,"array_positions":null}]}},"fragments":{"description":["Five-star \u003cmark\u003eboutique\u003c/mark\u003e hotel with 44 individually decorated rooms and suites."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_15918","score":2.418391425463296,"locations":{"description":{"boutique":[{"pos":1,"start":0,"end":8,"array_positions":null}]}},"fragments":{"description":["\u003cmark\u003eBoutique\u003c/mark\u003e hotel in the City Centre; Marco Pierre White restaurant on-site."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_6ddbfb54","id":"hotel_21847","score":2.2942874696887805,"locations":{"description":{"boutique":[{"pos":4,"start":19,"end":27,"array_positions":null}]}},"fragments":{"description":["Charming five-star \u003cmark\u003eboutique\u003c/mark\u003e hotel with a secluded patio and lush vertical garden."]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"wildcard":"bouti*ue","field":"description"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":43,"max_score":3.584615143683038,"took":2384276,"facets":null}
  • Numeric Range Query, whereby minimum and maximum numbers are specified, and matches within the range returned.

    ----> {"indexName":"travel-sample-index-unstored","size":10,"query":{"field":"id","max":10200.0,"min":10100.0}}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_13aa53f3","id":"route_10126","score":0.20746380094270872,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_13aa53f3","id":"hotel_10138","score":0.20746380094270872,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_13aa53f3","id":"landmark_10128","score":0.20746380094270872,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_13aa53f3","id":"landmark_10127","score":0.20746380094270872,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_13aa53f3","id":"landmark_10134","score":0.20746380094270872,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_13aa53f3","id":"landmark_10116","score":0.20746380094270872,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"hotel_10158","score":0.18678699332733317,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"route_10150","score":0.18678699332733317,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"route_10121","score":0.15745693430772972,"sort":["_score"]}
    {"index":"travel-sample-index-unstored_3c01f77ee05090a7_aa574717","id":"route_10132","score":0.15745693430772972,"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"min":10100,"max":10200,"field":"id"},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":88,"max_score":0.20746380094270872,"took":3926276,"facets":null}
  • Regexp Query, whereby a regular expression is submitted, to generate the conditions for successful matches.

    ----> {"indexName":"travel-sample-index-stored","size":10,"highlight":{"style":"html"},"query":{"field":"description","regexp":"[a-z]"}}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_41237","score":2.9424485879934785,"locations":{"description":{"b":[{"pos":3,"start":15,"end":16,"array_positions":null},{"pos":4,"start":17,"end":18,"array_positions":null}],"y":[{"pos":20,"start":104,"end":105,"array_positions":null}]}},"fragments":{"description":["Self contained \u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e apartment for 2 people sharing. Self catering Holiday Farmhouse to sleep 4 or 8. Pen \u003cmark\u003ey\u003c/mark\u003e Graig is 500m from Church Bay beach and the Anglesey Coastal Footpath"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_27626","score":1.5510963030486056,"locations":{"description":{"b":[{"pos":4,"start":20,"end":21,"array_positions":null},{"pos":5,"start":22,"end":23,"array_positions":null}],"y":[{"pos":8,"start":34,"end":35,"array_positions":null}]}},"fragments":{"description":["A reasonably priced \u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e near Coed-\u003cmark\u003ey\u003c/mark\u003e-Brenin with four ensuite rooms which can be either double or twin rooms. Beautiful Farm 2008, Regional Winner."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_2241","score":1.3555882835203943,"locations":{"description":{"b":[{"pos":4,"start":20,"end":21,"array_positions":null},{"pos":5,"start":22,"end":23,"array_positions":null},{"pos":32,"start":192,"end":193,"array_positions":null},{"pos":33,"start":194,"end":195,"array_positions":null}],"y":[{"pos":60,"start":352,"end":353,"array_positions":null}]}},"fragments":{"description":["…atchers are welcomed. This \u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e is conveniently located for visiting Bangor University staff and is located 10 minutes away from the soon to be opened 'Pontio' arts complex in Bangor and '\u003cmark\u003eY\u003c/mark\u003e Galeri' in …"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_26139","score":0.8486112340942231,"locations":{"description":{"b":[{"pos":3,"start":23,"end":24,"array_positions":null},{"pos":4,"start":25,"end":26,"array_positions":null}]}},"fragments":{"description":["Reasonably inexpensive \u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e lodging."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_18572d87","id":"hotel_24537","score":0.8453215360863323,"locations":{"description":{"b":[{"pos":1,"start":0,"end":1,"array_positions":null},{"pos":2,"start":2,"end":3,"array_positions":null}]}},"fragments":{"description":["\u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e 8 miles from the city center,within easy access from the A-28-A29-A151 motorways, this is an elegant Napoleon III style building in a fully secured walled park of 4 ha."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_54820232","id":"hotel_35668","score":0.7172073919299199,"locations":{"description":{"b":[{"pos":1,"start":0,"end":1,"array_positions":null},{"pos":2,"start":2,"end":3,"array_positions":null}]}},"fragments":{"description":["\u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e accommodation, 600 yards from Pennine Way."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_21036","score":0.6150102049883732,"locations":{"description":{"b":[{"pos":1,"start":0,"end":1,"array_positions":null},{"pos":2,"start":2,"end":3,"array_positions":null}]}},"fragments":{"description":["\u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e; Self-catering accommodation"]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_f4e0a48a","id":"hotel_37340","score":0.5614249644336504,"locations":{"description":{"b":[{"pos":3,"start":11,"end":12,"array_positions":null},{"pos":4,"start":13,"end":14,"array_positions":null}]}},"fragments":{"description":["Family run \u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e and licensed bar."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_15976","score":0.5099272696653835,"locations":{"description":{"b":[{"pos":1,"start":0,"end":1,"array_positions":null},{"pos":2,"start":2,"end":3,"array_positions":null}]}},"fragments":{"description":["\u003cmark\u003eB\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e with three double rooms."]},"sort":["_score"]}
    {"index":"travel-sample-index-stored_29bcd920b91f021e_aa574717","id":"hotel_26223","score":0.48263673880940405,"locations":{"description":{"b":[{"pos":83,"start":534,"end":535,"array_positions":null}],"r":[{"pos":82,"start":532,"end":533,"array_positions":null}]}},"fragments":{"description":["… fresh sushi and excellent steaks. Also located inside the hotel's lobby is the [http://www.therrazzroom.com Rrazz Room Theater], with nightly cabaret and \u003cmark\u003eR\u003c/mark\u003e\u0026\u003cmark\u003eB\u003c/mark\u003e and the Imperial Club rooms on the top fl…"]},"sort":["_score"]}
    {"status":{"total":6,"failed":0,"successful":6},"request":{"query":{"regexp":"[a-z]","field":"description"},"size":10,"from":0,"highlight":{"style":"html","fields":null},"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false},"hits":[],"total_hits":47,"max_score":2.9424485879934785,"took":980903,"facets":null}