Flavor search issue-Query gurus pls help

Having some issues when using the SEARCH option for flavor names and I’m hoping someone can give me some advice.

When doing a flavor search on the recipe side, the database tends to return the results of all variations of that flavor regardless of spelling, along with the number of recipes. But the kicker is even when the exact name is entered the DB still comes back with multiple versions and the URL that leads to them.
Example:


What I was hoping I could do is figure out how to make the DB return results of just the target flavor and it’s URL, in this example Sweet Cream (TPA)…while preserving the layout of the current page.
Maybe with some kind of special query in the Search box? Is this possible?
@Daath?

4 Likes

Do you mean like the old “I’m feeling lucky”-button on Google? Where it just took you immediately to the top result? We don’t have that at the moment, but I guess that could be done pretty easily :slight_smile:

4 Likes

I’ve committed a change so that if you press CTRL+ENTER in the search field it will take you to the result that has the most recipes :stuck_out_tongue_winking_eye: Only works for the flavor search page.

6 Likes

@daath Since you Are putting some effort in, I have another idea, which maybe sounds easy on paper but is for sure something many users would enjoy.
I think of a kind of “fuzzy” mode/button not only for the flavors, but also for the what can I make function.
For example, I have TPA Juicy Peach (DX) in my flavor stash, but I would like to see also recipes for the traditional TPA Juicy Peach in this fuzzy mode.
I do this manually and I found so many gems. But doing it manually is a challenge and I think it prevents many first timers to find the gems we have.
Sorry for just dropping it here, but I had this so long already in my mind.
Tak skal du har!

3 Likes

I just tried it and it’s not working. Is CTRL+ENTER machine specific? I’m on a Chromebook most of the time.

3 Likes

Not working here either. firefox.

2 Likes

Ditto…

2 Likes

Odd. It works in my Firefox but not in my Chrome; I guess that’s what you get when you do stuff when you’re tired :stuck_out_tongue_winking_eye: I’ll have a look later.

5 Likes

Try again - it works in my Chrome now, at least :stuck_out_tongue_winking_eye:

3 Likes

That’s a good idea, but a bit more difficult to implement … The closest thing to do right now, would be to allow for 1 missing flavor when you search in you “What can I make”-list …

3 Likes

Checked this morning, and it is working now. Windows 10, Firefox 77.0.1.

4 Likes

Thank you @Daath. But I think maybe I didn’t convey what I’m hoping to do correctly.
When using CTRL+ENTER trick from the flavor Search box I get this:

scrn1

…which is great!

But the result I’m actually looking for is something like this:


I’ve seen search results on a few flavors that did this but for the life of me I can’t remember what they are.

3 Likes

My reasoning for this… when commenting on a flavor correction I feel it would be better to link the user to a page like the one above, as opposed to linking to the flavor properties page.
I hope this makes sense. :confused:

3 Likes

Makes a lot of sense @TorturedZen.

3 Likes

Ah, got it. Now you can just get the ID of the flavor from the URL and add it to the flavor search page with “fid” like so:

https://e-liquid-recipes.com/flavors?fid=273229

:slight_smile:

5 Likes

Ah yes. I think that might work. But to just clarify (bare with me I’m a stoner), I would need to go to the properties page of a given flavor - cut the “fid=###” off that URL and then go back and paste it into the search results URL?
I could then use the resulting URL for the user to link to?

1 Like

Correct - https://e-liquid-recipes.com/flavor/273229 becomes https://e-liquid-recipes.com/flavors?fid=273229 :slight_smile:

4 Likes

Thanks @daath, and @TorturedZen for this thread.

2 Likes

Cool cool! Again, thanx boss! :wink:

Any time brother. And twice on Sunday!

2 Likes