Elasticsearch: Difference between revisions

Jump to navigation Jump to search
1,536 bytes added ,  15 October 2024
no edit summary
No edit summary
Line 1: Line 1:
== Concept mapping ==
<table class="wikisort" border="1">
            <tr>
                <th>MySQL (RDBMS)</th>
                <th>Elasticsearch</th>
                <th>Excel</th>
                <th>Example Value (Bookstore)</th>
            </tr>
            <tr>
                <td>Table</td>
                <td>Index</td>
                <td>Worksheet</td>
                <td>books</td>
            </tr>
            <tr>
                <td>Row</td>
                <td>Document</td>
                <td>Row</td>
                <td class="code">{ "id": 1, "title": "The Great Gatsby", "author": "F. Scott Fitzgerald", "price": 9.99 }</td>
            </tr>
            <tr>
                <td>Field</td>
                <td>Field</td>
                <td>Column</td>
                <td>title</td>
            </tr>
            <tr>
                <td>Schema</td>
                <td>Mapping</td>
                <td>Column Headers</td>
                <td class="code"><pre>{
    "properties": {
        "title": { "type": "text" },
        "author": { "type": "keyword" },
        "price": { "type": "float" }
    }
}</pre></td>
            </tr>
            <tr>
                <td>SQL</td>
                <td>DSL</td>
                <td>Formulas/Filters</td>
                <td class="code">SQL: SELECT * FROM books WHERE author = 'F. Scott Fitzgerald'
DSL: { "query": { "term": { "author": "F. Scott Fitzgerald" } } }
Excel: Filter column "author" for "F. Scott Fitzgerald"</td>
            </tr>
    </table>


== Count the number of documents ==
== Count the number of documents ==

Navigation menu