about summary refs log tree commit diff
diff options
context:
space:
mode:
authoruditgulati2021-03-06 15:59:18 -0600
committerBonfaceKilz2021-05-10 12:23:57 +0300
commita9fb861de6834f7a3351c08bf2bde00810921ac7 (patch)
tree1c0c9e3f912e45c50e908622df7fe35a74b58d4c
parent1afece5464520700901cbde19599ac45222ea58f (diff)
downloadgenenetwork2-a9fb861de6834f7a3351c08bf2bde00810921ac7.tar.gz
update gsearch pheno search
-rw-r--r--wqflask/wqflask/gsearch.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index fb8bdc55..262ba3c2 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -177,16 +177,8 @@ class GSearch:
                 {0}
                 AND PublishXRef.`PhenotypeId`=Phenotype.`Id`
                 AND PublishXRef.`PublicationId`=Publication.`Id`
-                AND	  (Phenotype.Post_publication_description REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Phenotype.Pre_publication_description REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Phenotype.Pre_publication_abbreviation REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Phenotype.Post_publication_abbreviation REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Phenotype.Lab_code REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Publication.PubMed_ID REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Publication.Abstract REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Publication.Title REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR Publication.Authors REGEXP "[[:<:]]{1}[[:>:]]"
-                    OR PublishXRef.Id REGEXP "[[:<:]]{1}[[:>:]]")
+                AND	(MATCH (Phenotype.Post_publication_description, Phenotype.Pre_publication_description, Phenotype.Pre_publication_abbreviation, Phenotype.Post_publication_abbreviation, Phenotype.Lab_code) AGAINST ('{1}' IN BOOLEAN MODE) )
+                AND	(MATCH (Publication.Abstract, Publication.Title, Publication.Authors) AGAINST ('{1}' IN BOOLEAN MODE) )
                 ORDER BY Species.`Name`, InbredSet.`Name`, PublishXRef.`Id`
                 LIMIT 6000
                 """.format(group_clause, search_term)