Improving search in Documents
In the whole Garg codebase 2 main searches are done to filter the documents of a given corpus:
- At the Doc Node level: full text search
- At the Viz (Graph | Phylo | ...) Node level: search with given ngrams only
This issue deals with the Node Documents search only to start with (the Viz level search will be easier but needs some frontend adaptations we will do after this issue).
For now in Corpus/Texts or Docs there is the Doc table linked to the contexts of text. Under the histogram there is a field search to filter the documents of the given corpus.
Currently only basic search with one expression can be done (even one word only) because the the search has to be translated into Postgresql search (using || or && boolean expressions).
In File: haskell-gargantext/src/Gargantext/Database/Action/Search.hs
the function is queryInCorpus which is using @@ sqlTSQuery (unpack q)
where you can rewrite the boolean query and adapt it with posgres operators.