Active
Project:
The eXtensible Catalog (XC) Drupal Toolkit
Version:
6.x-1.1-alpha4
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2010 at 13:00 UTC
Updated:
25 Mar 2010 at 17:58 UTC
Comments
Comment #1
pkiraly commentedHi,
This is a long project I'll finish this week.
Summary: there will be a configuration form, where you can add conditions of the value of facets.
The conditions can be based on any of the fields.
The document type conditions set (which govers the document type facet) will be supplied with default rules, what you can override.
Péter
Comment #2
yurikoikawa commentedHi Péter,
I'm sorry for being late to reply.
Thank you for your cooperation.
I'm looking forward to hearing from you again.
Comment #3
pkiraly commentedHi Yuriko,
I have commited some changes, including this one. On the facet editing page (xc/search/indexing/facets/add and xc/search/indexing/facets/%/edit) you can add your custom PHP codes to meet this requirement. I modified the default fields, so the format facet settings is similar (but not identical) to your request. I followed Jennifer's original specs, and it is slightly different than yours, but I hope you will find the logic. You need some metadata investigation, and maybe some trial and error, before you find the good solution.
You should run update.php, then go to xc/search/indexing/facets and click on restore defaults. If you made some changes in the facet indexing settings, save your database tables.
Hope it helps. If you have more questions, please contact me in the usual addresses: mail, skype (kirunews), issue queue etc.
Hope this helps.
Regards,
Péter
Comment #4
yurikoikawa commentedHi Péter,
It is a great help for us.
We'll try it soon. Thank you.
Yuriko
Comment #5
pkiraly commentedHi Yuriko,
Today I found a typo in the code I commited yesterday. I changed it, and seems to be good now. If there's still problem, please let me know.
Péter
Comment #6
pkiraly commentedHi Yuriko,
I investigated a lot the format facet problem. There were some problems, which prevented the previous solution to be really workable. These are:
- a simple 'actual field value' == 'expected value' comparision is not enough, because on both side there could be multiple values (practically each field may have multiple values, and our expected value is sometimes a list of values. I created two utility function: xc_util_contains($container, $values), and xc_util_is_url($url). Whith this two function the writing of the function, which evaluate conditions, and claims the value of the facets became more easy.
- as you may know the harvester process has two phase: harvesting/indexing and data normalization. In this later phase we merge the values of the connected work and expression level records into manifestations. This is the point, where we have all information together to evaluace the criteria of the format facet values. So I moved the process from the first phrase to this second phrase. It resulted, that the first phrase became somewhat quicker, and the later somewhat longer in time.
- during the test period it became clear, that the expected values in the specification and in the actual records do not fit in respect of lower case/upper case. So I needed to transform the values to lowercase before comparing them.
I tried it with a small record set, and a 60K record set. Tomorrow I will try it on a 500K record set. I hope that it will work for you as well. I commited all into the CVS repository. I suggest you to update files, run update.php (for another reason -- i changed the datatable of the OAI Harvester module as well), and go to eXtensible Catalog (XC) > XC Search > Indexing > Manage facets and click 'Restore defaults'. Then check the Format facet by clicking 'view' or 'edit' links. Of course: create a backup if you have important changes.
Hope this helps.
Péter