Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
what is the best criteria to search a product by name,brand,product code and a keyword in c# for proper ecommerce website .

What I have tried:

i try using json a web method called and the results return but it takes a little more time to search.i want fast search. what is the better way to search in c#
Posted
Updated 28-Dec-16 4:22am
Comments
ZurdoDev 28-Dec-16 8:16am    
Fastest in the eyes of the user is probably an ajax call to a webmethod. But it will all depend on how you write your code.
abhishekchadha 28-Dec-16 23:47pm    
i already do this ajax call to webmethod but it takes a little bit time for auto result i want just like flipkart enter keyword it shows the result

1 solution

For free text type searching if there are a lot of products you'll probably want to use something like SQL's freetext search, or you could even use lucene to index your product data. Google both approaches for more info, freetext is probably the easier to get up and running but lucene will probably give better performance and flexibility.

For things like product title, product code etc as long as you store that data in its own field in the product table and apply indexes to the fields then searching them should be quite fast anyway.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900