Commit 07b5ffa8 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[HAL] implement imt query for search field

parent 10f6b2a3
...@@ -540,7 +540,13 @@ searchQuery selection { databases, datafield: datafield@(Just (External (Just (H ...@@ -540,7 +540,13 @@ searchQuery selection { databases, datafield: datafield@(Just (External (Just (H
, selection = selection , selection = selection
}) defaultSearchQuery }) defaultSearchQuery
where where
term' = term <> " AND (" <> structIds <> ")" term' = "(en_title_t:\"" <> termEscaped <> "\" OR en_abstract_t:\"" <> termEscaped <> "\")" <> structQuery
-- TODO: Escape double quotes
termEscaped = term
structQuery = if Set.isEmpty imtOrgs then
""
else
" AND (" <> structIds <> ")"
joinFunc :: IMT_org -> String joinFunc :: IMT_org -> String
joinFunc All_IMT = "" joinFunc All_IMT = ""
joinFunc (IMT_org { school_id }) = "structId_i:" <> school_id joinFunc (IMT_org { school_id }) = "structId_i:" <> school_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment