This document contains useful things about Elasticsearch
The multi_match query is used to search for a given text across multiple fields in an Elasticsearch index.
It provides various types to control how the matching is executed and scored.
| version: '3.8' | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:8.14.1 | |
| container_name: elasticsearch | |
| environment: | |
| - bootstrap.memory_lock=true | |
| - discovery.type=single-node | |
| - xpack.security.enabled=false |
| ollama -v (locally, not docker) | |
| ollama version is 0.1.48 |
| #include <string.h> | |
| #include <ctype.h> | |
| #include <stdio.h> | |
| #define CANT_PAL 10 // CANTIDAD DE PALABRAS | |
| #define LONG_PAL 30 // LONGITUD MÁXIMA DE LAS PALABRAS | |
| // AYUDAS | |
| // funciones de caracteres | |
| // #include <ctype.h> |
Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files| # Similar to TypedDict but without typings | |
| # allow access keys as fields | |
| class DictObj: | |
| def __init__(self, **kwargs): | |
| self._update_internal_dict(dict(kwargs)) | |
| def _update_internal_dict(self, data: dict): | |
| self.__dict__.update(data) |
| #[test] | |
| fn iter_demo() { | |
| let v1 = vec![1, 2, 3]; | |
| let mut v1_iter = v1.iter(); | |
| // iter() returns an iterator of slices. | |
| assert_eq!(v1_iter.next(), Some(&1)); | |
| assert_eq!(v1_iter.next(), Some(&2)); | |
| assert_eq!(v1_iter.next(), Some(&3)); | |
| assert_eq!(v1_iter.next(), None); |