Skip to content

Commit

Permalink
3
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina committed Jul 13, 2024
1 parent 76e087c commit dd4398a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ public List<Concept> getConcepts(Filter filter, Pageable pageable) {
LEFT JOIN concept_node_meta AS continuous_min ON concept_node.concept_node_id = continuous_min.concept_node_id AND continuous_min.KEY = 'min'
LEFT JOIN concept_node_meta AS continuous_max ON concept_node.concept_node_id = continuous_max.concept_node_id AND continuous_max.KEY = 'max'
LEFT JOIN concept_node_meta AS categorical_values ON concept_node.concept_node_id = categorical_values.concept_node_id AND categorical_values.KEY = 'values'
WHERE concept_node.concept_node_id IN
WHERE concept_node.concept_node_id IN (
""";
QueryParamPair filterQ = filterGen.generateFilterQuery(filter, pageable);
sql = sql + filterQ.query();
sql = sql + filterQ.query() + "\n)";
MapSqlParameterSource params = filterQ.params();

return template.query(sql, params, mapper);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ private String createSearchFilter(String search, MapSqlParameterSource params) {
ts_rank(searchable_fields, (phraseto_tsquery(:search)::text || ':*')::tsquery) as rank
FROM
concept_node
LEFT JOIN concept_node_meta AS continuous_min ON concept_node.concept_node_id = continuous_min.concept_node_id AND continuous_min.KEY = 'min'
LEFT JOIN concept_node_meta AS continuous_max ON concept_node.concept_node_id = continuous_max.concept_node_id AND continuous_max.KEY = 'max'
LEFT JOIN concept_node_meta AS categorical_values ON concept_node.concept_node_id = categorical_values.concept_node_id AND categorical_values.KEY = 'values'
WHERE
concept_node.searchable_fields @@ (phraseto_tsquery(:search)::text || ':*')::tsquery AND
(
Expand Down

0 comments on commit dd4398a

Please sign in to comment.