Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ def text_search(self, text: str) -> List[Optional[cre_defs.Document]]:
'CRE:<name>' will search for the <name> in cre names
'<Node type e.g. Standard>:<name>[:<section><sectionID>:<subsection>:<hyperlink>]' will search for
all entries of <name> and optionally, section/subsection
'\d\d\d-\d\d\d' (two sets of 3 digits) will first try to match
'\\d\\d\\d-\\d\\d\\d' (two sets of 3 digits) will first try to match
CRE ids before it performs a free text search
Anything else will be a case insensitive LIKE query in the database
"""
Expand All @@ -1818,7 +1818,7 @@ def text_search(self, text: str) -> List[Optional[cre_defs.Document]]:
node_search = (
r"(Node|(?P<ntype>"
+ types
+ "))?((:| )?(?P<link>https?://\S+))?((:| )(?P<val>.+$))?"
+ r"))?((:| )?(?P<link>https?://\S+))?((:| )(?P<val>.+$))?"
)
match = re.search(cre_id_search, text, re.IGNORECASE)
if match:
Expand Down
2 changes: 1 addition & 1 deletion application/web/web_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def text_search() -> Any:
* 'CRE:<name>' will search for the <name> in cre names
* 'Standard:<name>[:<section>:subsection]' will search for
all entries of <name> and optionally, section/subsection
* '\d\d\d-\d\d\d' (two sets of 3 digits) will first try to match
* '\\d\\d\\d-\\d\\d\\d' (two sets of 3 digits) will first try to match
CRE ids before it performs a free text search
Anything else will be a case insensitive LIKE query in the database
"""
Expand Down