I m having little confusion using MySQL fulltext. I have database whose charset is set to utf-8
and collation set to utf8_unicode_ci
I have following flow of searching products. User chooses from the flow below to search any product
- user selects product_type, enum field with value consumable/unconsumable.
- Then selects product_nature, enum 0=>finished 1- unfinished.
- then user selects location, varchar User may select multiple location.
- then user specifies price ranges and so on (about 5 more selection) In search page the only thing users types is, location, price ranges. Rest all they select from combo.
My confusion is.
- Does my database supports FULL Text Search?
- What are the fields I need to index for enabling full text search.
- As full text is supported in
varchar
andtext
datatype field only. How to get relevant results if many fields user selects for filter is inenum
- I want to show exact match at top and nearly matching products depending upon the filters user selects like I described above. Does order by fulltext relevancy work here because there are many fields which are of type
enum
.
Edit For better understand for example
This search is for those specially who knows what to buy but doesn't know anything else. Like I need a Mobile PHone, but I don't know anything else, I just select its type(Wifi/without wifi) from combo, I then select camera (with/without), I then select other few features like this. I then specify price range I can afford, I then want phone available in store in particular location. For this I type location A, location B, location C
. I want results based on either of these location. And I want to order results according to the nearest match of the search parameter specified. Exact match to nearest match, then least nearest match. Hope this helps
Can anybody throw some light on this?
Thanks