Skip to content

Commit

Permalink
Search: a few fixes for custom metadata in advanced search (39265)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmitz-ilias committed Dec 7, 2023
1 parent 902dfbf commit 666df52
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 124 deletions.
12 changes: 6 additions & 6 deletions components/ILIAS/AdvancedMetaData/LuceneDataSource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<DataSource type="JDBC" action="append">
<Query>
<!-- text global required -->
SELECT concat('advancedMetaData_', val.field_id) field_name, val.field_id, vd.value
SELECT concat('advancedMetaData_', val.field_id) field_name, val.field_id, vd.value, vd.idx
FROM adv_md_values_enum val
JOIN adv_mdf_enum vd ON (val.field_id = vd.field_id AND value_index = idx)
JOIN adv_mdf_definition def ON (def.field_id = val.field_id)
Expand All @@ -25,13 +25,13 @@
</Query>
<Param format="list" type="string" value="objType" />
<Param format="list" type="int" value="objId" />
<Field store="YES" index="ANALYZED" column="value" type="text" dynamicName="field_name" />
<Field store="YES" index="ANALYZED" column="idx" type="text" dynamicName="field_name" />
<Field store="YES" index="ANALYZED" column="value" type="text" name="metaData" />
</DataSource>
<DataSource type="JDBC" action="append">
<Query>
<!-- text global optional -->
SELECT concat('advancedMetaData_', val.field_id) field_name, val.field_id, vd.value
SELECT concat('advancedMetaData_', val.field_id) field_name, val.field_id, vd.value, vd.idx
FROM adv_md_values_enum val
JOIN adv_mdf_enum vd ON (val.field_id = vd.field_id AND value_index = idx)
JOIN object_data obj ON (obj.obj_id = val.obj_id)
Expand All @@ -51,13 +51,13 @@
</Query>
<Param format="list" type="string" value="objType" />
<Param format="list" type="int" value="objId" />
<Field store="YES" index="ANALYZED" column="value" type="text" dynamicName="field_name" />
<Field store="YES" index="ANALYZED" column="idx" type="text" dynamicName="field_name" />
<Field store="YES" index="ANALYZED" column="value" type="text" name="metaData" />
</DataSource>
<DataSource type="JDBC" action="append">
<Query>
<!-- text local -->
SELECT concat('advancedMetaData_', val.field_id) field_name, val.field_id, vd.value
SELECT concat('advancedMetaData_', val.field_id) field_name, val.field_id, vd.value, vd.idx
FROM adv_md_values_enum val
JOIN adv_mdf_enum vd ON (val.field_id = vd.field_id AND value_index = idx)
JOIN object_data obj ON (obj.obj_id = val.obj_id)
Expand All @@ -77,7 +77,7 @@
</Query>
<Param format="list" type="string" value="objType" />
<Param format="list" type="int" value="objId" />
<Field store="YES" index="ANALYZED" column="value" type="text" dynamicName="field_name" />
<Field store="YES" index="ANALYZED" column="idx" type="text" dynamicName="field_name" />
<Field store="YES" index="ANALYZED" column="value" type="text" name="metaData" />
</DataSource>

Expand Down
Loading

0 comments on commit 666df52

Please sign in to comment.