Skip to content

Commit

Permalink
fix date sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillFish8 committed Aug 31, 2021
1 parent 0d16c72 commit c564740
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lnx"
version = "0.5.0"
version = "0.5.1"
authors = ["Harrison Burt <[email protected]>"]
edition = "2018"

Expand All @@ -16,12 +16,13 @@ uuid = { version = "0.8", features = ["v4"] }
hashbrown = { version = "0.11", features = ["serde"] }
axum = { git = "https://github.com/tokio-rs/axum.git", branch = "main" }
sqlx = { version = "0.5", features = ["sqlite", "runtime-tokio-rustls"] }
chrono = { version = "0.4", features = ["serde"] }

tower = "0.4"
structopt = "0.3"
tokio-rustls = "0.22"
log = "0.4"
anyhow = "1"
chrono = "0.4"
num_cpus = "1.13"
bytes = "1"
serde_json = "1"
Expand Down
3 changes: 2 additions & 1 deletion engine/src/index/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use tokio::sync::{oneshot, Semaphore};

use crate::correction::{self, correct_sentence};
use crate::structures::{QueryMode, QueryPayload};
use chrono::Utc;

/// Attempts to get a document otherwise sending an error
/// back to the resolve channel.
Expand Down Expand Up @@ -570,7 +571,7 @@ fn search(
(process_search!(searcher, schema, out.0), out.1)
},
FieldType::Date(_) => {
let out: (Vec<(i64, DocAddress)>, usize) =
let out: (Vec<(chrono::DateTime<Utc>, DocAddress)>, usize) =
order_and_search!(searcher, collector, field, &query, executor)?;
(process_search!(searcher, schema, out.0), out.1)
},
Expand Down

0 comments on commit c564740

Please sign in to comment.