classes/ezfezpsolrquerybuilder.php
protected function fieldTypeExludeList( $searchText )
    {
        if ( is_null( $searchText ) )
        {
            return array( 'date', 'boolean', 'int', 'long', 'float', 'double', 'sint', 'slong', 'sfloat', 'sdouble' );
        }

        $excludeFieldList = array();
        // Check if search text is a date.
        if ( strtotime( $searchText ) === false )
        {
            $excludeFieldList[] = 'date';
        }
        if  ( strtolower( $searchText ) !== 'true' &&
              strtolower( $searchText ) !== 'false' )
        {
            $excludeFieldList[] = 'boolean';
        }
        if ( !is_numeric( $searchText ) )
        {
            $excludeFieldList[] = 'int';
            $excludeFieldList[] = 'long';
            $excludeFieldList[] = 'float';
            $excludeFieldList[] = 'double';
            $excludeFieldList[] = 'sint';
            $excludeFieldList[] = 'slong';
            $excludeFieldList[] = 'sfloat';
            $excludeFieldList[] = 'sdouble';
        }

        return $excludeFieldList;
    }
protected function fieldTypeExludeList( $searchText )
    {
        if ( is_null( $searchText ) )
        {
            return array( 'date', 'boolean', 'int', 'long', 'float', 'double', 'sint', 'slong', 'sfloat', 'sdouble' );
        }

        $excludeFieldList = array();
        // Check if search text is a date.
        if ( strtotime( $searchText ) === false )
        {
            $excludeFieldList[] = 'date';
        }
        if  ( strtolower( $searchText ) !== 'true' &&
              strtolower( $searchText ) !== 'false' )
        {
            $excludeFieldList[] = 'boolean';
        }
        if ( !is_numeric( $searchText ) )
        {
            $excludeFieldList[] = 'int';
            $excludeFieldList[] = 'long';
            $excludeFieldList[] = 'float';
            $excludeFieldList[] = 'double';
            $excludeFieldList[] = 'sint';
            $excludeFieldList[] = 'slong';
            $excludeFieldList[] = 'sfloat';
            $excludeFieldList[] = 'sdouble';
        }

        return $excludeFieldList;
    }
protected function fieldTypeExludeList ( $ searchText ) { if ( is_null ( $ searchText ) ) { return array ( 'date' , 'boolean' , 'int' , 'long' , 'float' , 'double' , 'sint' , 'slong' , 'sfloat' , 'sdouble' ) ; } $ excludeFieldList = array ( ) ; // Check if search text is a date. if ( strtotime ( $ searchText ) === false ) { $ excludeFieldList [ ] = 'date' ; } if ( strtolower ( $ searchText ) !== 'true' && strtolower ( $ searchText ) !== 'false' ) { $ excludeFieldList [ ] = 'boolean' ; } if ( ! is_numeric ( $ searchText ) ) { $ excludeFieldList [ ] = 'int' ; $ excludeFieldList [ ] = 'long' ; $ excludeFieldList [ ] = 'float' ; $ excludeFieldList [ ] = 'double' ; $ excludeFieldList [ ] = 'sint' ; $ excludeFieldList [ ] = 'slong' ; $ excludeFieldList [ ] = 'sfloat' ; $ excludeFieldList [ ] = 'sdouble' ; } return $ excludeFieldList ; }
Check if search string requires certain field types to be excluded from the search

@param string Search string
If null, exclude all non text fields
@todo make sure this function is in sync with schema.xml
@todo decide wether or not to drop this, pure numeric and date values are
most likely to go into filters, not the main query

@return array List of field types to exclude from the search
Check if search string requires certain field types to be excluded from the search