Skip to content

Why do every .term will be fully read during search ? #2658

@xingtanzjr

Description

@xingtanzjr

Hi all,

I am new to use Tantivy. And I encountered a case that search is relatively slow. When I debug the code I found that, every .term file were fully read during search stage, which costed large I/O.

The code to compose the query is

 let query = QueryParser::for_index(&index, vec![content_field])
                            .parse_query(&content)
                            .expect("failed to parse query");
searcher.search(&query, &TopDocs::with_limit(limit).and_offset(offset)).expect("failed to search")

Is that ok ? Do you have some insights on that ?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions