anchor.diff:  
       member __.``Searching for i1 = add('10', '10', '10', '10') should support more than 2 parameters``() = 
           let result = 
  -            getQuery (index.IndexName, "i1 = add('10', '10', '10', '10')")
  +            getQuery (index.IndexName, "allof(i1 , add('10', '10', '10', '10'))")
               |> withColumns [| "_id"; "i1" |]
               |> searchAndExtract searchService
           result |> assertReturnedDocsCount 1
  
positive.code:         // Add test profiles
          index.PredefinedQueries <- 
              [| 
                  getQuery(index.IndexName, "et1 = #et1") |> withName "matchself"
                  getQuery(index.IndexName, "et1 = #et1") |> withName "matchselferror"
                  getQuery(index.IndexName, "et1 = isblank(#et1, #IGNORE)") |> withName "matchselfignore"
                  getQuery(index.IndexName, "et1 = isblank(#et1, 'd')") |> withName "matchselfdefault"
                  getQuery(index.IndexName, "et1 = #et2") |> withName "crossmatch"
                  getQuery(index.IndexName, "et1 = #et2") |> withName "crossmatcherror"
                  getQuery(index.IndexName, "et1 = isblank(#et2, #IGNORE)") |> withName "crossmatchignore"
                  getQuery(index.IndexName, "et1 = isblank(#et2, 'd')") |> withName "crossmatchdefault"
                  getQuery(index.IndexName, "et1 = 'h'") |> withName "constantmatch"
                  getQuery(index.IndexName, "i1 = add(#i2,#i1,'-2')") |> withName "crossmatchwithfunc"
                  getQuery(index.IndexName, "i1 = add(#i2,add(#i1,'-2'))") |> withName "crossmatchwithnestedfunc"
                  getQuery(index.IndexName, "i1 = add('10','18')") |> withName "matchwithfuncconstonly"
                  getQuery(index.IndexName, "i1 = add(#i2,#i2)") |> withName "crossmatchwithfieldonlyfunc"
                  getQuery(index.IndexName, "et1 = isblank(#et1, #et2)") |> withName "nestedcrossmatch"
              |]
          indexTestData (testData, index, indexService, documentService)
      
      member __.``When no value is passed in search profile then the field should match against itself``() =
          let result = 
              getQuery (index.IndexName, "et1:'a'")
              |> withPredefinedQuery "matchself"
              |> searchAndExtract searchService
          result |> assertReturnedDocsCount 1
  
      member __.``When the passed value is blank then the search will fail as the default behaviour is to throw error``() =
          let result = 
              getQuery (index.IndexName, "et1:''")
              |> withPredefinedQuery "matchself"
              |> searchService.Search
          test <@ result = fail(MissingVariableValue("et1")) @>
  
      member __.``When the required field value is not passed then the search will fail as the default behaviour is to throw error``() =
          let result = 
              // Can't use blank query string other wise the query validation will fail
              getQuery (index.IndexName, "et2:''")
              |> withPredefinedQuery "matchself"
              |> searchService.Search
          test <@ result = fail(MissingVariableValue("et1")) @>
  
      member __.``When the passed value is blank then the search will fail for self match configuration of [!]``() =
          let result = 
              getQuery (index.IndexName, "et1:''")
              |> withPredefinedQuery "matchselferror"
              |> searchService.Search
          test <@ result = fail(MissingVariableValue("et1")) @>
  
      member __.``When the required field value is not passed then the search will fail for self match configuration of [!]``() =
          let result = 
              getQuery (index.IndexName, "et2:''")
              |> withPredefinedQuery "matchselferror"
              |> searchService.Search
          test <@ result = fail(MissingVariableValue("et1")) @>
  
      member __.``When the passed value is blank then the search will ignore the clause for self match configuration of [*]``() =
          let result = 
              getQuery (index.IndexName, "et1:''")
              |> withPredefinedQuery "matchselfignore"
              |> searchAndExtract searchService
          // We should get all the records back as the query will be short circuited to match all query
          result |> assertReturnedDocsCount 8
  
      member __.``When the required field value is not passed then the search will ignore the clause for self match configuration of [*]``() =
          let result = 
              getQuery (index.IndexName, "et2:''")
              |> withPredefinedQuery "matchselfignore"
              |> searchAndExtract searchService
          result |> assertReturnedDocsCount 8
  
      member __.``When the required field value is blank then the search will use the default value for self match configuration of []``() =
          let result = 
              getQuery (index.IndexName, "et1:''")
              |> withPredefinedQuery "matchselfdefault"
              |> withColumns [| "*" |]
              |> withPredefinedQueryOverride
              |> searchAndExtract searchService
  
negative.code: 
      member __.``Sorting is possible on int field``() =
          let result = 
              getQuery (index.IndexName, "allof(i1, '1')")
              |> withColumns [| "i2" |]
              |> withOrderBy "i2"
              |> searchAndExtract searchService
  