fn verify_search_fields(&self, schema: &Schema) -> Result<()> {
        let mut reject = vec![];

        for (_, entry) in schema.fields() {
            let name = entry.name().to_string();
            if !self.search_fields.contains(&name) {
                continue;
            }

            if !entry.is_indexed() {
                reject.push(name)
            }
        }

        if reject.is_empty() {
            Ok(())
        } else {
            Err(anyhow!(
                "the given search fields contain non-indexed fields, \
                 fields cannot be searched without being indexed. Invalid fields: {}",
                reject.join(", ")
            ))
        }
    }
/// Validates all search fields so that they're all indexed.
///
/// If the search fields contain any fields that are not indexed,
/// the system will list all rejected fields in a Error.
/// Or if any fields are not text.
Validates all search fields so that they're all indexed.
If the search fields contain any fields that are not indexed,
the system will list all rejected fields in a Error.
Or if any fields are not text.
Validates all search fields so that they ' re all indexed . If the search fields contain any fields that are not indexed the system will list all rejected fields in a Error . Or if any fields are not text .
fn verify_search_fields(&self, schema: &Schema) -> Result<()> {
        let mut reject = vec![];
        for (_, entry) in schema.fields() {
            let name = entry.name().to_string();
            if !self.search_fields.contains(&name) {
                continue;
            }
            if !entry.is_indexed() {
                reject.push(name)
            }
        }
        if reject.is_empty() {
            Ok(())
        } else {
            Err(anyhow!(
                "the given search fields contain non-indexed fields, \
                 fields cannot be searched without being indexed. Invalid fields: {}",
                reject.join(", ")
            ))
        }
    }
fn verify_search_fields ( & self , schema : & Schema ) -> Result < ( ) > { let mut reject = vec ! [ ] ; for ( _ , entry ) in schema . fields ( ) { let name = entry . name ( ) . to_string ( ) ; if ! self . search_fields . contains ( & name ) { continue ; } if ! entry . is_indexed ( ) { reject . push ( name ) } } if reject . is_empty ( ) { Ok ( ( ) ) } else { Err ( anyhow ! ( " \
 " reject join ( " " ) ) ) } }
Validates all search fields so that they're all indexed.
Validates all search fields so that they ' re all indexed .
&self
schema
&Schema
&self
schema
&Schema