Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

support some methods to return all docs when text is empty #45

Closed
bloodynumen opened this issue Mar 20, 2018 · 2 comments
Closed

support some methods to return all docs when text is empty #45

bloodynumen opened this issue Mar 20, 2018 · 2 comments
Labels
Milestone

Comments

@bloodynumen
Copy link

bloodynumen commented Mar 20, 2018

Like this:

searcher.Search(types.SearchReq{
    TextMayBeEmpty: true,
    Text: "",
    RankOpts: &types.RankOpts{
        OutputOffset: 0,
        MaxOutputs:   100,
    },
})

It's useful for providing web api

@vcaesar
Copy link
Member

vcaesar commented Mar 20, 2018

You can use spaces " " to return all docs:

searcher.Search(types.SearchReq{
    Text: " ",
    RankOpts: &types.RankOpts{
        OutputOffset: 0,
        MaxOutputs:   100,
    },
})

@vcaesar vcaesar added this to the v0.20.0 milestone Mar 20, 2018
@bloodynumen
Copy link
Author

@vcaesar thank you~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants