Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Search Buissness Logic, Backend #3

Open
Insax opened this issue Jul 14, 2018 · 0 comments
Open

Optimize Search Buissness Logic, Backend #3

Insax opened this issue Jul 14, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@Insax
Copy link
Member

Insax commented Jul 14, 2018

Check in

Check in in new branch feature/smartsearch/backend

Idea:

We optimize the search function to increase useablility which is pretty broke right now.

Implementation:

The :tag1, tag2, tag3: Keyword System stays, we just optimize it.
a.) Ajax request will be vars now (Done by frontend designer):
keyword (nullable, string)
actualTag (nullable, string)
prevTags (nullable, jsonFormat)

b.) keyword / detection and formatting is in frontend, we just work with the passed values
Remove old tag / keyword detection

If only the keyword is given:

Select from database where title like '%keyword%' -> in eloquent orm.

if only tags are given and no keyword

The target is to autocomplete the "actual tag" or append content - depending on some occourences

if only the field actualTag is given: select all tags which are LIKE 'actualTag%' and return them (json encode)

also return all notes which have tags LIKE 'actualTag%' (json encode)

if we have field actualTag and prevTags is given:

like before return all accourences to actualTag
return all notes which have ALL of the GIVEN tags (AND LOGIC)

if we have prevTags and Keyword

no longer autocomplete anything
return notes which have ANY of the tags, but LIKE '%KEYWORD%' (tags are or logic, keyword is AND logic with tags)

Create an own custom form request validator to check if the request is valid

@Insax Insax added the enhancement New feature or request label Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant