mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
feat: Display the documents fields in the order they were declared
This commit is contained in:
parent
a488c00a2e
commit
ebc95cb8f2
@ -14,6 +14,7 @@ csv = "1.0.7"
|
||||
diskus = "0.5.0"
|
||||
env_logger = "0.6.1"
|
||||
jemallocator = "0.1.9"
|
||||
linked-hash-map = "0.5.2"
|
||||
meilidb-core = { path = "../meilidb-core", version = "0.1.0" }
|
||||
quickcheck = "0.8.2"
|
||||
rand = "0.6.5"
|
||||
|
@ -2,16 +2,17 @@
|
||||
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
use std::collections::btree_map::{BTreeMap, Entry};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::collections::HashSet;
|
||||
use std::error::Error;
|
||||
use std::io::{self, Write};
|
||||
use std::iter::FromIterator;
|
||||
use std::path::PathBuf;
|
||||
use std::time::{Instant, Duration};
|
||||
|
||||
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
|
||||
use structopt::StructOpt;
|
||||
use linked_hash_map::LinkedHashMap;
|
||||
use rustyline::{Editor, Config};
|
||||
use structopt::StructOpt;
|
||||
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};
|
||||
|
||||
use meilidb_core::Highlight;
|
||||
use meilidb_data::Database;
|
||||
@ -35,7 +36,7 @@ pub struct Opt {
|
||||
pub char_context: usize,
|
||||
}
|
||||
|
||||
type Document = HashMap<String, String>;
|
||||
type Document = LinkedHashMap<String, String>;
|
||||
|
||||
fn display_highlights(text: &str, ranges: &[usize]) -> io::Result<()> {
|
||||
let mut stdout = StandardStream::stdout(ColorChoice::Always);
|
||||
|
Loading…
Reference in New Issue
Block a user