pub struct Search { /* private fields */ }Expand description
The search index of what the served document publishes: what keeps it current, and the snapshot each search reads.
Implementations§
Source§impl Search
impl Search
Source§impl Search
impl Search
Sourcepub fn is_live(&self) -> bool
pub fn is_live(&self) -> bool
Whether it still has a writer to keep it current: a frozen index has none, nor its threads.
Sourcepub fn changed(&self, folder: &Folder, paths: &[PathBuf])
pub fn changed(&self, folder: &Folder, paths: &[PathBuf])
Brings the index up to date after paths changed, appeared or
vanished — after folder has heard of them. Any of them can change
what is published — a page’s Topics, a document file, a
.gitignore, a folder — and a widget can change which of a page’s
tags are widgets, so a burst that holds a Markdown file, a YAML
file, a widget’s .tsx, a .gitignore, a folder or a path that is
gone is indexed. What is published is kept from the last burst, and
found again only when the burst can change it — a Markdown file’s
footprint changed (its Topics, a chapter’s title, an unlisted page’s
search), or a file came or went, or is a document file or a
.gitignore. Then only the pages new to it, moved in it, or among
paths — or whose document’s widgets folder holds one of them — are
read again. A frozen index never changes.
Auto Trait Implementations§
impl !Freeze for Search
impl !RefUnwindSafe for Search
impl !UnwindSafe for Search
impl Forget for Search
impl Move for Search
impl Send for Search
impl Sync for Search
impl Unpin for Searchwhere
Arc<InnerIndexReader>: Unpin,
Arc<WatchCallback>: Unpin,
Align4<u32>: Unpin,
Align1<u8>: Unpin,
Box<dyn Sync + Send>: Unpin,
Box<dyn Directory>: Unpin,
Arc<RwLock<MetaInformation>>: Unpin,
Arc<InnerSchema>: Unpin,
*const u8 is !null: Unpin,
Arc<ThreadPool>: Unpin,
Arc<RwLock<HashMap<String, TextAnalyzer>>>: Unpin,
Arc<InnerInventory<InnerSegmentMeta>>: Unpin,
Arc<dyn SegmentPlugin>: Unpin,
Arc<Inner, System>: Unpin,
Arc<Packet<'static, Result<(), TantivyError>>>: Unpin,
Arc<Inner<CompactDoc>>: Unpin,
*mut Counter<Channel<SmallVec<[AddOperation; 4]>>>: Unpin,
*mut Counter<Channel<SmallVec<[AddOperation; 4]>>>: Unpin,
*mut Counter<Channel<SmallVec<[AddOperation; 4]>>>: Unpin,
Arc<InnerSegmentUpdater>: Unpin,
Arc<RwLock<InnerDeleteQueue>>: Unpin,
Arc<Atomic<u64>>: Unpin,
*const LeafNode<String, Unit> is !null: Unpin,
Box<(String, Unit)>: Unpin,
Arc<Document>: Unpin,
*const LeafNode<String, u64> is !null: Unpin,
Box<(String, u64)>: Unpin,
Box<dyn BoxableTokenizer>: Unpin,
Arc<Snapshot>: Unpin,
impl UnsafeUnpin for Searchwhere
*const ArcInner<InnerIndexReader> is !null: UnsafeUnpin,
PhantomData<ArcInner<InnerIndexReader>>: UnsafeUnpin,
*const ArcInner<WatchCallback> is !null: UnsafeUnpin,
PhantomData<ArcInner<WatchCallback>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const dyn Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Sync + Send>: UnsafeUnpin,
*const dyn Directory is !null: UnsafeUnpin,
PhantomData<dyn Directory>: UnsafeUnpin,
*const ArcInner<RwLock<MetaInformation>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<MetaInformation>>>: UnsafeUnpin,
*const ArcInner<InnerSchema> is !null: UnsafeUnpin,
PhantomData<ArcInner<InnerSchema>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<ThreadPool> is !null: UnsafeUnpin,
PhantomData<ArcInner<ThreadPool>>: UnsafeUnpin,
*const ArcInner<RwLock<HashMap<String, TextAnalyzer>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<HashMap<String, TextAnalyzer>>>>: UnsafeUnpin,
*const ArcInner<InnerInventory<InnerSegmentMeta>> is !null: UnsafeUnpin,
PhantomData<ArcInner<InnerInventory<InnerSegmentMeta>>>: UnsafeUnpin,
PhantomData<Arc<dyn SegmentPlugin>>: UnsafeUnpin,
PhantomData<JoinHandle<Result<(), TantivyError>>>: UnsafeUnpin,
*const ArcInner<Inner<CompactDoc>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner<CompactDoc>>>: UnsafeUnpin,
*mut Counter<Channel<SmallVec<[AddOperation; 4]>>>: UnsafeUnpin,
*mut Counter<Channel<SmallVec<[AddOperation; 4]>>>: UnsafeUnpin,
*mut Counter<Channel<SmallVec<[AddOperation; 4]>>>: UnsafeUnpin,
*const ArcInner<InnerSegmentUpdater> is !null: UnsafeUnpin,
PhantomData<ArcInner<InnerSegmentUpdater>>: UnsafeUnpin,
*const ArcInner<RwLock<InnerDeleteQueue>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<InnerDeleteQueue>>>: UnsafeUnpin,
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
*const LeafNode<String, Unit> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Unit)>>: UnsafeUnpin,
PhantomData<(PathBuf, Option<Arc<Document>>)>: UnsafeUnpin,
PhantomData<(PathBuf, Footprint)>: UnsafeUnpin,
*const LeafNode<String, u64> is !null: UnsafeUnpin,
PhantomData<Box<(String, u64)>>: UnsafeUnpin,
*const dyn BoxableTokenizer is !null: UnsafeUnpin,
PhantomData<dyn BoxableTokenizer>: UnsafeUnpin,
*const ArcInner<Snapshot> is !null: UnsafeUnpin,
PhantomData<ArcInner<Snapshot>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more