CouncilDataProject / CouncilDataProject/cdp-frontend

Implement strict search and other useful search operators

Open
#138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
17
Forks
28
PR merge metrics
No merged PRs in 30d

Description

I would love this for the general event search too so I am going to work on that problem right now.

_Originally posted by @JacksonMaxfield in https://github.com/CouncilDataProject/cdp-frontend/issues/137#issuecomment-986056104_

> I would love this for the general event search too so I am going to work on that problem right now.

Pausing for a bit on this because I think alg is somewhat hard.... in psuedocode it's something like:
```
query = 'hello world testing "strict part a" "strict part b'
// some func to get to query parts
queryParts = ["hello", "world", "testing", '"strict part a"', '"strict part b"']
// some func to move to ngrams for non strict parts
ngramSearches = ["hello", "hello world", "hello world testing", "world", "world testing", "testing"]
// some func to move to just strict parts
strictSearches = ["strict part a", "strict part b"]
// some func to clean and stem both
cleanedNGramSearches = ["hello", "hello world", "hello world test", "world", "world test", "test"]
cleanedStrictSearches = ["strict part a", "strict part b"]
// run queries for the strict searches first
// run queries for the grams like how we are currently doing it but filtered by events that matched the strict results first??? (which means really all these results are doing are adding weighting to events which is fine)
// merge to unified event gram results
```

But that leaves interesting questions like how do we handle AND and OR. Need to look to google for how they are doing it basically imo.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.