public void test_query_write_with_querybuilder_with_documentType() { var query = new StringQuery("Name", "智慧市政", OccurType.Should); query.Next(new StringQuery("DocumentType", DocumentType.Folder.ToString(), OccurType.Must)); var results = _provider.Query <DocumentSearchResult>(query); Assert.AreEqual(results.Count, 1); }
public void test_write_documents_with_emptyString_condition_with_null_range_begin_end() { var query = new StringQuery("Name", "智慧市政", OccurType.Should); query.Next(new RangeQuery(string.Empty, " ", string.Empty, OccurType.Should)); var results = _provider.Query <DocumentSearchResult>(query); Assert.AreEqual(results.Count, 3); }
public void test_write_documents_with_query_condition_with_range_begin_end_start_startIndex() { var query = new StringQuery("Name", "智慧市政", OccurType.Should); query.Next(new RangeQuery("UpdateTime", "20140721", "20141221", OccurType.Must)); var results = _provider.Query <DocumentSearchResult>(query, 0, 1); Assert.AreEqual(results.Count, 1); }
public void test_write_documents_with_query_and_fields() { var query = new StringQuery("Name", "报价明细表", OccurType.Should); query.Next(new StringQuery("DocumentType", DocumentType.Excel.ToString(), OccurType.Should)); var results = _provider.Query <DocumentSearchResult>(query); Assert.AreEqual(results.Count, 1); }
public void test_write_spaces_with_keyword_with_range_begin_end() { var query = new StringQuery("Name", "智慧市政", OccurType.Should); query.Next(new StringQuery("DocumentType", DocumentType.Folder.ToString(), OccurType.Must)) .Next(new RangeQuery("UpdateTime", "20140721", "20141221", OccurType.Must)); var results = _provider.Query <DocumentSearchResult>(query); Assert.AreEqual(results.Count, 1); }
public void test_write_documents_with_query_condition_with_different_documentType() { WriteSpace("spaces"); var query = new StringQuery("Name", "空间", OccurType.Should); query.Next(new StringQuery("DocumentType", DocumentType.Word.ToString(), OccurType.Must)); var results = _provider.Query <SearchResult>(query); Assert.AreEqual(results.Count, 0); }
public void test_write_spaces_with_keyword_with_must_occurType() { WriteSpace("spaces"); var query = new StringQuery("Name", "空间"); query.Next(new StringQuery("Content", "空间", OccurType.Must)); var results = _provider.Query <SearchResult>(query); Assert.AreEqual(results.Count, 0); }
public void test_write_documents_with_query_condition_with_range_begin_end() { WriteSpace("spaces"); var query = new StringQuery("Name", "空间", OccurType.Should); query.Next(new RangeQuery("UpdateTime", "20140521", "20140622", OccurType.Must)); var results = _provider.Query <DocumentSearchResult>(query, 0, 1); Assert.AreEqual(results.Count, 1); }
public void test_write_documents_with_query_and_fields() { WriteSpace("spaces"); var query = new StringQuery("Name", "空间", OccurType.Should); query.Next(new StringQuery("DocumentType", DocumentType.Folder.ToString(), OccurType.Must)); var results = _provider.Query <DocumentSearchResult>(query); Assert.AreEqual(results.Count, 2); }