Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

SearchQueryBuilder.cs 752 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. namespace Search.Models
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. [Serializable]
  6. public class SearchQueryBuilder
  7. {
  8. private const int DefaultHitPerPage = 5;
  9. public SearchQueryBuilder()
  10. {
  11. this.Refinements = new Dictionary<string, IEnumerable<string>>();
  12. }
  13. public string SearchText { get; set; }
  14. public int PageNumber { get; set; }
  15. public int HitsPerPage { get; set; } = DefaultHitPerPage;
  16. public Dictionary<string, IEnumerable<string>> Refinements { get; private set; }
  17. public virtual void Reset()
  18. {
  19. this.SearchText = null;
  20. this.PageNumber = 0;
  21. this.Refinements.Clear();
  22. }
  23. }
  24. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...