Skip to content

Commit cae0bd6

Browse files
committed
Update Tantivy
1 parent 5782645 commit cae0bd6

File tree

3 files changed

+42
-40
lines changed

3 files changed

+42
-40
lines changed

Cargo.lock

Lines changed: 34 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ tower-lsp = "0.19.0"
1313
env_logger = "0.10.0"
1414
filetime = "0.2.17"
1515
lib-ruby-parser = "4.0.3"
16-
tantivy = { git = "https://github.com/quickwit-oss/tantivy" }
16+
# tantivy = { git = "https://github.com/quickwit-oss/tantivy" }
1717
tokio = { version = "1.20.1", features = ["full"] }
1818
# tower-lsp = { path = "../tower-lsp" }
1919
# walkdir = "2.3.2"
@@ -27,6 +27,7 @@ quit = "2.0.0"
2727
psutil = "3.2.2"
2828
regex = "1.7.1"
2929
serde_json = "1.0.108"
30+
tantivy = "0.21.1"
3031
# which = "4.4.0"
3132
# shells = "0.2.0"
3233

src/persistence.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::process::Command;
1212
use std::str;
1313
use tantivy::collector::TopDocs;
1414
use tantivy::query::{BooleanQuery, BoostQuery, Occur, Query, RegexQuery, TermQuery};
15-
use tantivy::{schema::*, ReloadPolicy};
15+
use tantivy::{schema::*, ReloadPolicy, Document};
1616
use tantivy::{Index, IndexWriter};
1717
use tower_lsp::lsp_types::InitializeParams;
1818
use tower_lsp::lsp_types::{
@@ -1230,7 +1230,7 @@ impl Persistence {
12301230
pub fn find_references(
12311231
&self,
12321232
params: TextDocumentPositionParams,
1233-
) -> tantivy::Result<Vec<tantivy::Document>> {
1233+
) -> tantivy::Result<Vec<Document>> {
12341234
let path = params.text_document.uri.path();
12351235
let relative_path = path.replace(&self.workspace_path, "");
12361236

@@ -1401,7 +1401,7 @@ impl Persistence {
14011401
pub fn find_references_in_workspace(
14021402
&self,
14031403
query: String,
1404-
) -> tantivy::Result<Vec<tantivy::Document>> {
1404+
) -> tantivy::Result<Vec<Document>> {
14051405
if let Some(index) = &self.index {
14061406
let reader = index
14071407
.reader_builder()
@@ -1458,7 +1458,7 @@ impl Persistence {
14581458
pub fn documents_to_locations(
14591459
&self,
14601460
path: &str,
1461-
documents: Vec<tantivy::Document>,
1461+
documents: Vec<Document>,
14621462
) -> Vec<Location> {
14631463
let mut locations = Vec::new();
14641464

@@ -1495,7 +1495,7 @@ impl Persistence {
14951495
pub fn rename_tokens(
14961496
&self,
14971497
path: &str,
1498-
documents: Vec<tantivy::Document>,
1498+
documents: Vec<Document>,
14991499
new_name: &String,
15001500
) -> WorkspaceEdit {
15011501
let mut edits = Vec::new();
@@ -1537,7 +1537,7 @@ impl Persistence {
15371537

15381538
pub fn documents_to_symbol_information(
15391539
&self,
1540-
documents: Vec<tantivy::Document>,
1540+
documents: Vec<Document>,
15411541
) -> Vec<SymbolInformation> {
15421542
let mut symbol_infos = Vec::new();
15431543

0 commit comments

Comments
 (0)