Post Reply

Search Contents Management in ASP.NET jMedia

4 11, 2016 9:33 PM #1

mediaadmin

mediaadmin

Posts:87
Points:940
Joined July 2014
ASP.NET jMedia provides various way to search contents based on various parameters with every type of content listings.

There are three ways to filter records based on search terms

i: Broad Search
ii: Filter records based on tags
iii: Filter records based on categories

Broad Search:
 You can add the following option if you want to search contents based on broad search which mostly try to match keyword with title, description, tags and categories for each record in order to load data.

Broad search option will be

Model.QueryOptions.Term = "Search Keyword";
Model.QueryOptions.SearchType = 3; // Represent Broad Search

Tags Search:
You can filter all contents based on matching tags with one or multiple tags passed via Tags search properly. Sample code will be

Model.QueryOptions.Tags = "sports, bmw 7"; // this will try to load all contents whose tags matched with sports or bmw 7


Category Search:
You can filter all contents based on one or more categories. Note: categories to be password via array of string attribute e.g

string[] _categories = { "sports", "entertainment" };
Model.QueryOptions.Categories = _categories;

This will try to load all contents associated with categories sports and entertainment.

---

Please post your query below if you have any problem in search filters.